[r6rs-discuss] [Formal] Enumeration types should be reified

William D Clinger will at ccs.neu.edu
Sun Jun 10 16:49:58 EDT 2007


John Cowan wrote:
> Specifically, make-enumeration should return a unique opaque
> enumeration-type object.  This would then be accepted by
> enum-set-{universe, indexer, constructor} and the procedures returned
> by the latter two.  Each enumeration-type object would be distinct in
> the sense of eqv? from any other (so eqv? would need a new reference to
> library section 14).

If this is to be considered, then I would suggest
going further and requiring any two enumeration-type
objects whose universes represent the same set of
symbols to be eqv? and interchangeable with respect
to all of the enumeration-set operations.

The obvious way to implement that is by hash-consing,
but implementations that want to test set equality on
each operation would still be free to do that.

Will



More information about the r6rs-discuss mailing list