[swift-evolution] Pre-proposal: CaseEnumerable protocol (derived collection of enum cases)
david at alkaline-solutions.com
Tue Jan 19 19:40:56 CST 2016
> On Jan 19, 2016, at 6:05 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>> On Jan 19, 2016, at 1:54 PM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
>> This is just my opinion, but I think declaring a conformance ought to be enough. You could imagine the compiler-synthesized implementation being provided by a protocol extension with sufficiently advanced language features from the future to implement the default behavior.
> Also +1
> -- E, who believes in the sufficiently advanced language features from the future
As long as they aren’t trying to kill my parents or myself for a bug I wrote in the source code for Skynet, I’m fine.
More seriously, I think of this sort of thing as being a default implementation of a protocol via an extension, just using internal language implementation features.
More information about the swift-evolution