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 19:49:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

On Tue 13 Dec 2011 18:28, Mark H Weaver <address@hidden> writes:

> >> (let ((xxx 2))
> >>   #{ #(set! xxx (1+ xxx)) #})

> In the general case, Lilypond needs to _execute_ the outer Scheme code
> before the parser/evaluator is able to even _see_ the inner Scheme code,
> because it needs to parse/evaluate the Lily code in between the two, and
> we've already established that parsing cannot be not be done without
> runtime information.

What does it mean to execute a `(let ((xxx 2))' ?  I think I need to
read the thread again, because I am really not getting it.

>   (let ((xxx 2))
>     (capture-lexical-environment))
>
> How difficult would it be to implement this?

Dunno.  I was thinking that we could have a special form to return a
list of the identifiers in scope.  Or perhaps, some syntax-bindings
procedure, to operate on syntax objects.  A macro could use that data to
make a closure that captures all of the bindings, if that's your thing.

Andy
-- 
http://wingolog.org/



reply via email to

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