guile-devel
[Top][All Lists]
Advanced

[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: Tue, 13 Dec 2011 16:48:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On Tue 13 Dec 2011 16:27, David Kastrup <address@hidden> writes:

>> It sounds like `current-bindings' is the thing you need.
>
> It will at least be a year before any solution that does not work with
> Guile 1.8 will be accepted into Lilypond.

It is possible to have similar interfaces with different
implementations, using `cond-expand'.  lily.scm does this in one case,
implementing 2.0 interfaces on 1.8.

I'll take a look at implementing something like this.

To summarize your issue: you have code like:

  (lambda (a b c)
    #{ here I have custom code that references lexical variables;
       should it be able to set them too?  }#) 

It would be relatively easy to pass in an alist of the lexicals, for
reference purposes; but do you want to be able to set them too, from
within that EDSL?

Andy
-- 
http://wingolog.org/



reply via email to

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