[swift-evolution] Ad hoc enums / options

Brent Royal-Gordon brent at architechies.com
Tue May 31 22:25:45 CDT 2016


> And the obvious answer is you can have up to 255 of these babies for the anonymous enum type, and be able to pass numerical equivalents UInt8 with compile time substitution. That the ad-hoc enumeration is basically a syntactic shorthand for UInt8, with an enforced upper bound compile time check simplifies everything including switch statements.

If I wanted a language like that, I'd be writing C, not Swift.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list