[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] R7RS-large comparators
On Wed, Jul 17, 2013 at 2:58 PM, Kevin Wortman <kwortman@x> wrote:
> The by-the-book representation for such a finite set of
> non-numeric elements is an enum, so we ought to use an enum.
And Scheme does not, currently, have very good support for enums. A
proper enum system should allow users to create new enumerated types,
with named, interned members (comparable by eq? and case), type
testers, and preferably a nice written representation and a default
total order (order of mention in the definition of the enum). I think
all enum types should be distinct from each other, and it may also be
advisable to make them distinct from non-enum types like symbols.
Working this out well is nontrivial (consider espcially the issue of
written representations for generative enum types), and doing it badly
just to cover this one use case would be un-Schemely.
~Alexey
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports