Language interop Lassi Kortela 11 Sep 2020 17:55 UTC
> Scheme and Common Lisp deal with > almost the same concepts. A library interface rarely needs to be > concerned with the parts where they diverge > > The differences in macros are very important too. Few would want to > rewrite their syntax-rules or syntax-case macros in define-macro. Macros are mostly an internals issue, not an interface issue. In the rare somewhat case that a library exports a macro, equivalent syntax-rules and defmacro definitions can be given. It doesn't take that many minutes to write a macro. Even SRFI 177 wasn't a big macro-writing effort by any means, we spent all our time discussing the design. Hygienic macros in CL would be nice though. > A significant part of library design is simply naming things. > > One of the reasons I decided very early not to worry too much about > names in libraries is Scheme's excellent support for > import-with-rename. If you don't like some names, rename them > yourself. If you have conflicts, use import-with-prefix. Ideally most programming language features should be McDonalds instead of fine dining; people shouldn't have to do anything fancy when they are not solving fancy problems. Consistency and good defaults matter a lot. Scheme is a pleasure to use in part because things are named so well. If only there was a way to convince languages to use the same names for the same things. Perhaps it could be done with shims if there's enough buy-in. You've invested a lot in Lojban; has that taught you any pertinent lessons?