New Lisps seem to be thick on the ground lately. Graham and Morris have just released an implementation of theirs, Arc. My initial impressions, based on reading the tutorial and the source, not on actually using the language:
- There are a lot of novel names for familiar operators, but many of them are good. I will be stealing
mostand several others. The bad ones are too short: I don't like
rem; they're not common enough to require such short names, and they risk colliding with other things. There are also some cryptic compounds like
inis very convenient. I wish I'd thought of it.
- There's syntax for
compose. (The latter two, oddly, are implemented as magic on symbols, not forms - that is, the compiler understands some naming conventions.) Would short names (
o not, and
- There are no user-defined types. Well, there are (see
tag) but they only have one slot. This separates the identification and encapsulation aspects of user-defined types from the representation aspect. I'm not sure I like it, though.
- The first libraries are aimed at web apps - not surprising, given the authors.
- Assignment and
defineare the same operator. No, they're not! assignment is
set. Do we never learn? And that apparently isn't confusing enough, so it's called
- Macros are distinguished dynamically: the function, not the variable, is tagged as a macro. This means a call to a variable can be compiled differently depending on what value its global binding happens to have at macroexpand time. This will become a problem. There's a comment (
warn when a fn has a parm that's already defined as a macro) that suggests the authors are aware of the problem.
- Scheme distinguishes
nil. Arc doesn't. Since lists are often passed back and forth between Scheme and Arc, this is a significant implementation headache. I think in situations like this its's best to just let the host language's data show through, since it makes little difference to the quality of the language. (And what is
nildoing in there anyway?)
I find all this rather encouraging, because I think I can do better. I'd better go work on my new Lisp.