<div dir="ltr">João,<div><br></div><div>your proposal has been proposed before, but I don&#39;t think it&#39;s been formally submitted for review yet:</div><div><a href="https://github.com/jtbandes/swift-evolution/blob/977a9923fd551491623b6bfd398d5859488fe1ae/proposals/0000-derived-collection-of-enum-cases.md">https://github.com/jtbandes/swift-evolution/blob/977a9923fd551491623b6bfd398d5859488fe1ae/proposals/0000-derived-collection-of-enum-cases.md</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 5:57 PM, João Nunes <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have one proposal for the language to add a property to enums with the total number of cases.<br>
<br>
Example:<br>
<br>
enum Section {<br>
case Tag<br>
case Article<br>
}<br>
<br>
let cases = Section.caseCount<br>
<br>
This would be extremely useful when using enums for tableviews.<br>
<br>
What do you think?<br>
<br>
<br>
João Nunes<br>
<br>
Sent from my iPhone<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div><br></div>