Brent Royal-Gordon <mailto:[email protected]> wrote:
I think we'd be much better off having a list of all cases. That would
make this feature useful for enums which don't have a raw type, or
don't use Int as their raw type, or don't use sequential raw values
for their cases.
That approach has been discussed before, but not formally proposed.
I'd just like to +1 this as it's a feature I often use - enums are
perfect for limiting user choices (days of the week, anyone?) and having
to manually create and update the list of cases would be much easier and
safer with a dedicated feature. (I'd prefer for it not to be a set
because a set has no inbuilt order; if it were returned as a set I'd
then have to create an array manually anyway; I want my weekdays to
appear neither randomly sorted nor alphabetical.
Catja Pafort
--
www.extelligentcocoa.org
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution