This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reintroducing old `defined?'


Sorry Jost!
Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE> wrote:
> Roland Orre <orre@nada.kth.se> writes:
>
>> Jost>(define a 12)
>> Jost>(b)                        -> 12
>> Jost>
>> Jost>(undefine a)
>> Jost>a                          -> ERROR
>> Jost>(b)                        -> value "undefined"
>> Jost>                              ^^^^^^^^^^^^^^^^^ WRONG!
>> Jost>
>> Jost>
>> Jost>So I think it would be better to drop `undefine' completely.  
>> 
>> Are you really serious with kind of example :-) ?

> The problem is that when b is memoized,  you can't remove the
> vcell (a . 12) anymore.  What (undefine a) *should* do is to remove
> the vcell completely. But this is not possible.  So the current code
> just sets its cdr to `undefined' which is IMHO wrong; the symbol is
> still there.  

I see your point now. Actually I never checked your lines in the
interpreter last time...

Well, for me, as being rather pragmatic I don't see this as a big
problem. I can't say that it has a simple solution at the moment,
but I guess it is rather easy to fix, but as still being pragmatic
I don't see why this should stop us to using it (if it is defined..).

It is not at all essential in the same way as defined? , but still nice
and useful to clean up things when necessary.

	Best regards
	Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]