Hi David, On Wed 14 Dec 2011 11:27, David Kastrup <d...@gnu.org> writes:
> 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. Let's call it `(the-environment)', as it is what it was called in Guile 1.8. >> why should we have it in Guile? > > feature completeness and user friendliness. OK, so we are not arguing for efficiency then. (That's fine, but we should be clear about it.) > Emacs Lisp or Lua or other binding-intensive systems. `the-environment' is not useful for Elisp or Lua. We already have an OK Elisp implementation, and it will be quite good once bipt merges his branch. It is implemented as a compiler to tree-il. Likewise there is a branch for Lua. It has some issues, but not unsolveable, and not related to this question. It is also implemented as a compiler to tree-il. > Language interfaces that are not strictly ad-hoc and closed-door would > certainly help in keeping Guile interesting for applications where the > respective maintainers don't have to count on the continued > cooperation of Guile developers, but merely on the continued existence > of published interfaces. Indeed. > But an outside package meddling with undocumented internals is not safe > to rely on at all. It can break at any point of time with no active > Guile developer being in a position where he would feel compelled to fix > it for the sake of Guile. I agree. I agree also that Guile should do its best to be good for lilypond. It is my opinion -- and I could be wrong here, either by misunderstanding (again!) the issues, or for whatever reason -- that closures are the best solution to the #{#} problem. Reasons: * Lambda is standard, well-understood, and general. * Using `lambda' does not preclude compilation. * Using closures does not require any additional work on the part of Guile. (This is only partly selfish; it also decreases the amount of coupling of lilypond to any particular Guile version.) * Allows for integration with the debugger, in 2.0. (Currently, interpreted code does not debug well.) * Potentially more efficient, and will benefit from future speed improvements in Guile. WDYT? Andy -- http://wingolog.org/