News for hackers. Stuff that matters.
Re:Three unique features of Lisp in 2010 by amalcon on Friday January 28, 2011 @11:07AM (#2152314)
1. Special variables are pretty unique, but I think that's because people designing languages these days don't think they are a good idea. Debug flags seem to be the "killer app", as it were, and I do often wish I could have a special variable in another language for just that reason.

Of course, it's pretty easy to implement that functionality on top of C++ if you really want to. It's a little ugly, but it works.

2. I've never used that before, but it looks really nice. It seems pretty straightforward to implement in any language with full continuations, but such languages are sadly very rare.

3. That's kind of vague. He mentions mutating the state of the lexical closure, which doesn't appear to have any downsides, save potentially making a program harder to reason about and dangerous race conditions (say, with pmap). I'd be all for getting those in more languages.

The other thing he mentions looks like basically a multi-level return, which (while certainly a powerful feature) seems like a great way to break encapsulation. That sounds like one of those features that we might be better off having, but only if most people don't know about it. Fortunately, it's pretty straightforward to implement in terms of continuations (even the limited continuations some JVM languages have based on the throw/catch primitives).

There are no comments on this comment yet.