[swift-evolution] Proposal: Enum 'count' functionality

Brent Royal-Gordon brent at architechies.com
Mon Dec 21 02:46:05 CST 2015

> I’ve put a proposal up on GitHub to add a cases ‘count’ functionality to Enums for the Swift language
> https://gist.github.com/andyyhope/2fc5b6bee8ee1346f688

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.

Brent Royal-Gordon

More information about the swift-evolution mailing list