> | enum Planet : Int {
> | case Mercury = 1, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune
> |
> | init?(caseName name : String) {
The compiler actually does this already through RawRepresentable if you put
`String` as your raw type. So what's the use case for this? Code which needs
both a non-String rawValue *and* needs to look up cases by name? How common do
you think that is?
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution