bug-guile
[Top][All Lists]
Advanced

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

Re: Strange undefined binding bug coupled to module system


From: Marius Vollmer
Subject: Re: Strange undefined binding bug coupled to module system
Date: Wed, 15 Dec 2004 18:29:08 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Mikael Djurfeldt <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
>
>> Mikael Djurfeldt <address@hidden> writes:
>> 
>> > 2004-04-22  Dirk Herrmann  <address@hidden>
>> >
>> >    (scm_m_define): Change order to first create binding and
>> >    evaluating the expression afterwards.
>> >
>> > While this change works in the R5RS situation without a module system,
>> > the presence of a module system, with the difference between imported
>> > and local bindings, introduces complications.
>> 
>> What would happen if you just revert that change?
>
> The change is a bugfix for another bug, so reverting it would swap one
> bug for another.

Ahh, I see.  I'd say a good behavior for 'define' then is the following:

 - When the defined name has a local binding, use that binding.

 - When the defined name has an imported binding, look up the value of
   that binding and make a new local binding initialized with that
   value.

 - When the defined name has no binding, make a new one and initialize
   it with #<unspecified>.

Then the expression is evaluated and the new (or old local) binding
from above is set to the resulting value.

Ok?




reply via email to

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