One of the things that surprised me is that there still isn’t concise syntax 
for creating option sets, a pattern I see out in the wild a fair bit.  While 
Swift 2 did introduce OptionSetType for structs, it still feels somewhat obtuse 
and non-obvious.  It would be great if we could something like:

options NotSoSecretVariations {
        case ProteinStyle,
        case AnimalStyle,
        case GrilledOnions,
        ...
}

That said, I have a feeling this isn’t the first time the Swift team has come 
across a pitch like this.  If this really is unfeasible, it would be great and 
really educational to hear what the challenges are.

Dan
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to