guile-devel
[Top][All Lists]
Advanced

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

Re: summary: lilypond, lambda, and local-eval


From: Hans Aberg
Subject: Re: summary: lilypond, lambda, and local-eval
Date: Thu, 15 Dec 2011 17:52:03 +0100

On 15 Dec 2011, at 11:21, Andy Wingo wrote:

> The "delayed evaluation" thread is a bit long and confusing, so I would
> like to try to summarize it.
> 
> Lilypond has a way to embed Lilypond code in Scheme, and Scheme code in
> Lilypond code.  The former uses a reader macro, #{#}.  The latter uses
> specially-marked variables and expressions, specifically, those preceded
> by $ or #.
...
> It took some time for everyone to understand the problem.  In the end,
> there were four workable possibilities.
> 
>  1) Keep using closures.

When doing a parser on top of Guile, I noticed one must first build an 
unevaluated closure, and only thereafter call the evaluator. Scheme has some 
restrictions forcing this, for example, the lambda cannot appear as a free 
symbol, though it is possible in Guile using scm_sym_lambda. 

It might be useful with a variation of scm_eval_string() that only parses and 
builds the closure, but not calls the evaluator.

Hans





reply via email to

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