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: Bruce Korb
Subject: Re: illegal uses of define in guile
Date: Mon, 14 Oct 2002 10:49:50 -0700

Dirk Herrmann wrote:
> 
> Currently, guile allows the following:
>   (if (not (defined? '%load-verbosely))
>       (define %load-verbosely #f))

I do that.

> This is in contrast to R5RS (maybe even already in contrast to R4RS,
> but I haven't checked that).  Allowing such placements of define will make
> it impossible to determine statically whether after evaluation of the
> form the corresponding identifier will be bound or not.  That is, we
> should disallow this behaviour.

Just because static analysis is hard/difficult/impossible
does not mean you have to disallow the construct.  It may
mean you have to disable "memoization" or "optimization"
of it -- that's okay.  But invalidating peoples work just
because you have an optimization problem, ... well it is
as bad as saying you cannot alias an "intptr_t" with a
pointer in C.

> Second, we should decide about how to deal with such forms.  Since guile
> has allowed this before, there may exist code that makes use of this
> feature.  It will, however, be difficult to support this feature as
> 'deprecated' when separating memoization and execution.

:-(




reply via email to

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