[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anything better for delayed lexical evaluation than (lambda () ...)?

From: Andy Wingo
Subject: Re: Anything better for delayed lexical evaluation than (lambda () ...)?
Date: Mon, 12 Dec 2011 22:50:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On Mon 12 Dec 2011 19:29, Mark H Weaver <address@hidden> 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

[0]; a lovely language.
Terrifies me, as an implementor.  Looks like a user's delight though.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]