On Tue 13 Dec 2011 10:02, David Kastrup <d...@gnu.org> writes:

> Lilypond's input language is not "David's current strategy".

I was referring to your implementation strategy.  Mark describes
another implementation strategy.

> It does not help because it requires _advance_ knowledge of when you are
> going to want to fish for environments.  You can call Lilypond's
> #{ ... #} construct in the normal REPL.  You can call it in any function
> definition.  It is pervasive.

I was suggesting to evaluate all lilypond "scheme" code with the lilypond
"scheme" interpreter.  That would make `the-environment' available
everywhere.

I still think making your #{}# parser expand to lexically-scoped Scheme
is the best option.

Another option is to use the reflective facilities to implement a form
of procedure-environment.  If you compile your Scheme procedures, with
partial evaluation disabled, you should be able to use program-bindings
to get this information.

I wonder if we could provide some sort of current-bindings syntactic
form, also.  It would require psyntax hooks, but it could work.

Andy
-- 
http://wingolog.org/

Reply via email to