On Mon 12 Dec 2011 19:29, Mark H Weaver <m...@netris.org> writes: > You are using Guile in a very unusual way. You have constructed a > hybrid language of both Scheme and Lilypond, where each can be nested > within the other (so far so good), but -- and here's the kicker -- you > apparently want to implement this hybrid language using two separate > interpreters maintained by two separate groups that are each able to run > code within lexical environments established by the other one. > > This is a fundamentally bad idea, because this structure makes it > impossible for either of these language implementations to evolve in any > significant way. It forces them both to remain simple interpreters.
FWIW Mark I agree with you. But, in the event that David wants to continue with his current strategy, there are other things that can be done. David, did you know that Guile's evaluator is implemented in Scheme? That means that if you want an evaluator with different semantics -- for example, something closer to Kernel[0], as David appears to want -- then you can implement an evaluator that provides for fexprs and the like, and it will run about as well as Guile's evaluator. Did you see my implementation of `local-eval' [1]? It leverages (hah!) Guile's macro expander, but otherwise is a straightforward interpreter. If you find it slow, there are some simple, classic optimizations that can be made. With some work, it could present a similar interface to 1.8's `local-eval', `procedure-environment', `the-environment', and such things. [0] http://web.cs.wpi.edu/~jshutt/kernel.html; a lovely language. Terrifies me, as an implementor. Looks like a user's delight though. [1] http://lists.gnu.org/archive/html/guile-user/2011-02/msg00032.html Regards, Andy -- http://wingolog.org/