[R6RS] Enumerations proposal pre-draft

William D Clinger will at ccs.neu.edu
Wed May 17 16:43:11 EDT 2006

Mike wrote:
> > Here is yet another draft of the enumerations proposal.  Its
> > interface is pretty different from what Mike described in the
> > previous draft, but its semantics are pretty similar.
> Thanks!  I actually don't dislike many things about it. I do like the
> brevity, and the explicit projection into subsets.
> The only objections I currently see are these:
> - I really dislike the heavy use of overloading.  It's especially
>   confusing in the case of <index-of>.  It's a tradeoff I don't know
>   how to resolve.  How about you give on <index-of> and I give on
>   <type-name>?

Sounds good to me.  I presume you are agreeing to eliminate the
zero-argument overloading of <index-of> (which no longer performs
an essential function anyway).  For <type-name>, how about we make
it into a procedure of zero arguments that returns the universe as
a set?  From that set, a program could obtain a constructor and
predicate as procedures via the reflective interface, or it could
use the long form to name them directly and also to define a
constructor macro as well as a constructor procedure.

If this sounds like what you thought you meant, then I'll revise
the draft proposal accordingly.

> - It can't be used to define sets of things other than symbols, which
>   my previous proposal could.  But I suppose a separate form could
>   handle that, and we don't need it for R6RS.

Are you referring to the limitations of the <type-name> macro we
are agreeing to flush?

Aside from that macro, I don't see anything in the draft proposal
that would prevent implementations from extending the proposal to
allow non-symbol elements in sets.  If the proposal were to make
it into the R6RS, of course, then our recent vote on munition 2
would outlaw such extensions, but that problem (if you want to
consider it a problem) is with our recent vote, not with the

The real problems with extending the proposal to allow arbitrary
elements in enumeration sets are that you'd have to specify the
meaning of equality, and you'd have to worry about interactions
between mutation and your Fundierung axiom(s).


More information about the R6RS mailing list