[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: Wed, 14 Dec 2011 14:35:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi David,

On Wed 14 Dec 2011 11:27, David Kastrup <address@hidden> writes:

> Andy Wingo <address@hidden> writes:
>> On Wed 14 Dec 2011 08:50, Mark H Weaver <address@hidden> 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

>> 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

> 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.


> 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.


  * 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.



reply via email to

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