[swift-evolution] Pre-proposal: CaseEnumerable protocol (derived collection of enum cases)
cyano at me.com
Tue Jan 19 12:21:30 CST 2016
> On 18 Jan 2016, at 00:44, Jacob Bandes-Storch via swift-evolution <swift-evolution at swift.org> wrote:
> Introduce a CaseEnumerable protocol. Conforming to CaseEnumerable will automagically derive a static var cases, whose type is a CollectionType of all the enum's values.
Hm, I don’t think I like that. Are there other examples of magic protocols in Swift?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution