Arc Forumnew | comments | leaders | submitlogin
3 points by absz 6081 days ago | link | parent

NewLISP has been discussed before on these fora (such as at http://arclanguage.org/item?id=244), and in fact you once brought it up yourself (http://arclanguage.org/item?id=2887). You may recall that it was roundly panned by many people (myself included). Summarizing these threads, here are two of the main reasons:

1. One-reference-only storage. This means that something like (cdr lst) must copy the entire list, makes it impossible to create cyclic data structures, etc. As a consequence of this, variables are not passed by reference.

2. Dynamic binding/lack of closures (and continuations). This is one of the worst, in my view; I find dynamic binding confusing, opaque, and (potentially) bug-prone. It may well have its uses, but not as the default.

The general workaround for these is the "context". This appears (I am not an expert) to be a rudimentary module system that works by prefixing defined and referenced symbols by context-name:, unless they are already so prefixed. To pass something by reference, you must pass in its name (such as 'xs), rather than just the value (such as xs). You must, however, take care to prevent variable capture (!), and wrap your names in contexts. This is how lexical binding is simulated.

There are other, smaller issues that people have, and there are certainly things it gets right (e.g. it appears to have regular expressions). But they are eclipsed by the major flaws outlined above.