3 ms·
Not really. The first has to do with how variable scope is managed. The second involves exception handling, and if your language unwinds the stack while looking
by silentbicycle 16y ago
Not really. The first has to do with how variable scope is managed. The second involves exception handling, and if your language unwinds the stack while looking for a handler, it's usually already too late.
The third has to do with how local variables are managed for functions defined at runtime - while you could rewrite code with macros to pass an implicit closure value array to the function at all points of use, it would be quite a bit less awkward to have it part of the language proper. Heck, it's not that unusual to have C functions that take a void * argument for "userdata"; the function/userdata combination is one way of representing closures when compiling to C.
- spacemanaki 16y agoYeah I was waiting for someone to call me on this. I thought it might not be possible but wasn't sure. Mostly it was cool to see a "unique features of Lisp" blog post which didn't even mention macros.