[Top][All Lists]

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

Re: defined?

From: Mikael Djurfeldt
Subject: Re: defined?
Date: Mon, 13 Jan 2003 17:47:54 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Marius Vollmer <address@hidden> writes:

> Matt Hellige <address@hidden> writes:
>> [Egil Moeller <address@hidden>]
>> > The problem is
>> > 
>> > guile> (let ((b 5)) (eval 'b  (interaction-environment)))
>> > <unnamed port>: In expression b:
>> > <unnamed port>: Unbound variable: b
>> > ABORT: (unbound-variable)
>> Yes, good point. I suppose the problem is that you want a closure
>> representing the actual current environment rather than the top-level.
>> It seems like there should be a way to do this...?
> I think we should not support run-time lookup in lexical environments.
> Doing so would make the job of a compiler much harder.  And I think it
> is generally very unclean way of specifying and implementing the
> environment that foreign code is executed in.

I agree.

However, I have a suggestion:

I've always thought of the-environment, procedure-environment,
local-eval etc as part of a "reflection API" rather than the standard
API.  They are, for example, excellent for things like implementing
debugging tools.

I suggest that we keep these as part of the reflection API as long as
convenient, but clearly state that they are not part of the standard
API.  I further suggest that the reflection API make no guarantees for
the future, but rather is allowed to change along with the


reply via email to

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