Re: [swift-dev] Re-pitch: Deriving collections of enum cases

2017-11-10 Thread Brent Royal-Gordon via swift-dev
> Personally I like the flexibility provided by the associatedtype, but I also > recognize it won't be incredibly useful for enums — more so if we wanted to > provide e.g. UInt8.allValues, whose ideal implementation might be "return > 0...UInt8.max". So I could see allowing allValues to be any s

Re: [swift-dev] Re-pitch: Deriving collections of enum cases

2017-11-10 Thread Robert Widmann via swift-dev
> On Nov 6, 2017, at 2:54 AM, Jacob Bandes-Storch via swift-dev > wrote: > > Over a year ago, we discussed adding a magic "allValues"/"allCases" static > property on enums with a compiler-derived implementation. The original > proposal PR ha