[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: illegal uses of define in guile
From: |
Bruce Korb |
Subject: |
Re: illegal uses of define in guile |
Date: |
Tue, 15 Oct 2002 06:58:10 -0700 |
Dirk Herrmann wrote:
> > (if (some-sort-of-context-test)
> > (begin
> > (define mumble ....)
> > ...
> > ) )
> >
> > 'cuz that's where I'd really have my problem. :-(
>
> I wonder what people's objective is when they use these constructs?
My guess is that you are thinking about a program written entirely
in Scheme. In my context, I have a list of things that need doing,
among them defining a scheme value that may even be derived from
non-scheme information. Later on, I'll test ``(some-sort-of-context-test)''
or, even, whether or not "mumble" got defined in order to decide
about what to do. This "later on" occurrs in a completely different
part of my program. Remember, this all gets embedded in the context
of an encompassing program.
> 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?
Sometimes. Not usually, though, but given that the function
(defined? ...) exists, I've used it to decide program flow.
Re: illegal uses of define in guile, rm, 2002/10/15
Re: illegal uses of define in guile, Marius Vollmer, 2002/10/18