guile-devel
[Top][All Lists]
Advanced

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

Re: illegal uses of define in guile


From: Dirk Herrmann
Subject: Re: illegal uses of define in guile
Date: Tue, 15 Oct 2002 08:15:17 +0200 (CEST)

On Mon, 14 Oct 2002, Bruce Korb wrote:

> Neil Jerram wrote:
> 
> >     >> Currently, guile allows the following:
> >     >> (if (not (defined? '%load-verbosely))
> >     >> (define %load-verbosely #f))
> > 
> >     Bruce> I do that.
> > 
> > I do too; however, I guess one could instead write this:
> > 
> > (define %load-verbosely
> >         (if (defined? '%load-verbosely)
> >             %load-verbosely
> >             #f))
> > 
> > Would this work?
> 
> Even if it worked in that example, it leaves open:
> 
>   (if (some-sort-of-context-test)
>       (begin
>         (define ....)
>         ...
>   )   )
> 
> 'cuz that's where I'd really have my problem.  :-(

I wonder what people's objective is when they use these constructs?  Do
you really want to construct two different top-level environments, where
once the symbol has a definition and once it has not?  Are you (mis)using
the definedness of a symbol as a means to communicate boolean values?

Do other scheme implementations allow this?

Best regards
Dirk Herrmann





reply via email to

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