Andy Wingo <wi...@pobox.com> writes: > On Wed 14 Dec 2011 08:50, Mark H Weaver <m...@netris.org> writes: > >> I have successfully implemented the (capture-lexical-environment) >> special form in the evaluator, and also primitive-local-eval. > > I dunno, Mark. That's a neat hack, but why should we have it in Guile? > It can't compile. It's not for efficiency, because if you wanted more > efficiency, you would compile. So what is it for? It has a cost, so it > needs to justify itself.
For starters, it's for handling languages like Lilypond, which fundamentally _cannot_ be compiled. It's not a question of implementation strategy. Even if someone were willing to rewrite Lilypond's implementation from scratch, I have become convinced that it cannot be compiled without redesigning the language itself. More generally, it's to increase the generality and flexibility of Guile. One of the things I like most about Scheme is that it is powerful enough to implement just about anything on top of it, using just about any strategy you wish, in a simple, straightforward manner, thanks to advanced features like macros and continuations. I found it somewhat embarrassing that Guile 2.0 was unable to gracefully support a language that Guile 1.8 handled beautifully. I would like to fix that. Also, I think that it is crucially important to keep the Lilypond developers happy with Guile. We don't have very many users. We should make an effort to keep our existing users happy. Mark