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

Re: DEFINED?



On Wed, 20 May 92 12:42:30 -0400, "Aubrey Jaffer" <jaffer@martigny.ai.mit.edu> said:

> The addition of the following syntax to Scheme would allow automatic
> detection of optional features of R5RS.  Currently, optional features
> are frustrating because one can't use them in portable programs.
> DEFINED? would allow uniform detection of feature support.

>    (defined? <symbol>)					syntax

>  Equivalent to #t if <symbol> is a syntactic keyword (such as IF), has
>  a syntactic definition or binding (macro) or is a symbol with a
>  top-level value (such as CAR).  Otherwise equivalent to #f.

> My intent here is that DEFINED? clauses can be replaced at macro
> expansion time with #t or #f.  It is also acceptable if DEFINED? of
> lexically bound variables is #t in the scope of the binding.

How do you see this as interacting with the following paragraph in the
standard?

+ Some implementations of Scheme use an initial environment in
+ which all possible variables are bound to locations, most of
+ which contain undefined values.  Top level definitions in
+ such an implementation are truly equivalent to assignments.

It seems to me that this would totally defeat your purpose of allowing
automatic detection of optional features of R5RS.

david carlton
carlton@husc.harvard.edu

       My EARS are GONE!!