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

From: William D Clinger <will>
Date: Sun, 10 Jun 2007 16:49:58 -0400

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
Received on Sun Jun 10 2007 - 16:49:58 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC