2 ms·
>You can implement almost anything within CL because you have control over every part of the code-processing process. Almost. There is one big missing piece.
by nabla9 10y ago
>You can implement almost anything within CL because you have control over every part of the code-processing process.
Almost. There is one big missing piece. Standard code walker. If CL had standard code walker that could correctly walk trough any piece of standard CL code, it would implement fully the promise of Lisp and you could build almost anything on top of it with ease.
- lisper 10y agoTrue, but 1) there are open-source code-walkers that do a pretty good job, 2) many implementations expose their internal code walker in one way or another and 3) you can do somewhere between 90 and 99% of what you'd want to do with a code walker using MACROLET. My pet peeve is that ((...) ...) is a syntax error, so you can't implement Scheme in Common Lisp without violating the standard. But see http://www.flownet.com/ron/lisp/combination-hook.lisp http://www.flownet.com/ron/lisp/combination-hook.lisp for an example of how easy it is to hack at least one implementation to support this.
- dreamcompiler 10y agoThe lack of mandatory tail calls and call/cc also make implementing Scheme in CL hard, although the former is actually present in most mainstream implementations. Various flavors of continuations can be implemented with macros, but they require coding changes and are not as general as Scheme continuations.
- ScottBurson 10y agoIt's not the only thing I would add, but I agree. The other two pieces I wish had been standardized are coroutines, and the internal syntax used by backquote.
- netsettler 10y agoWe tried to do a standard code walking / macro introspection thing but it had much detail we realized we were going to get wrong, so we backed out of it rather than freeze something bad. It's appropriate to a level 2 standard, just as the MOP was.