From: John Cowan Date: Tue, 5 Jun 2007 18:18:46 -0400 Subject: [Formal] Enumeration types should be reified Submitter: John Cowan Issue type: Defect Priority: Major Component: Enumerations Report version: 5.93 Summary: Enumeration types should be reified Currently, some enumeration procedures will work on two enumeration sets if they have the same underlying universe (considered as a list of symbols), but union, intersection, and difference depend on sharing the same enumeration types. However, there is no way to tell if enumeration sets are of the same type except trying to union them and catching the &assertion exception. This comment proposes that the enumeration type be made available to Scheme programmers. 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). A new procedure enumeration-type would, given an enumeration set, return the corresponding enumeration-type object. While this design requires one extra procedure, it clearly separates enumeration sets in their role as sets from their role as prototypes. RESPONSE: While the editors were favorably inclined towards the change, it was too late in the process to consider such a significant change. Therefore, the suggestion was not adopted.