<div dir="ltr">Proposal revised & submitted:<div><br></div><div><a href="https://github.com/apple/swift-evolution/pull/114" target="_blank">https://github.com/apple/swift-evolution/pull/114</a><br></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 20, 2016 at 3:28 PM, <span dir="ltr"><<a href="mailto:davesweeris@mac.com" target="_blank">davesweeris@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oh, ok. I must’ve misread something then.<br>
<br>
- Dave Sweeris<br>
<div><div><br>
> On Jan 20, 2016, at 15:25, Joe Groff <<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>> wrote:<br>
><br>
><br>
>> On Jan 20, 2016, at 3:24 PM, <a href="mailto:davesweeris@mac.com" target="_blank">davesweeris@mac.com</a> wrote:<br>
>><br>
>> Off the top of my head?<br>
>> enum NumClassification {<br>
>> case None(Int)<br>
>> case Even(Int)<br>
>> case Odd(Int)<br>
>> case Prime(Int)<br>
>> case Negative(Int)<br>
>> case Positive(Int) //Always gotta end on a positive note :-)<br>
>> }<br>
>><br>
>> Although I must admit, if there’s a purpose to CaseEnumerable (or whatever it’s being called now) beyond just automatically getting a static cases:[Self] and labels:[String], I’ve missed the memo about it.<br>
><br>
> That's the extent of it, as I see it. Asking for the collection of case constructors seems like a different thing to me—you're getting a [(Payload) -> Self] rather than a [Self] collection.<br>
><br>
> -Joe<br>
><br>
>><br>
>> - Dave Sweeris<br>
>><br>
>>> On Jan 20, 2016, at 15:18, Joe Groff <<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>> wrote:<br>
>>><br>
>>><br>
>>>> On Jan 20, 2016, at 3:13 PM, David Sweeris <<a href="mailto:davesweeris@mac.com" target="_blank">davesweeris@mac.com</a>> wrote:<br>
>>>><br>
>>>> If the associated values are all enums themselves, that's great. What if your enum is an error type, and the associated values are all strings with maybe diagnostic info or time stamps or something?<br>
>>><br>
>>> Then I don't even know what you would use CaseEnumerable for. Do you have a more concrete use case in mind?<br>
>>><br>
>>> -Joe<br>
>><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>