[swift-evolution] Enum case count

João Nunes joao3001 at hotmail.com
Thu Feb 18 11:57:48 CST 2016


I have one proposal for the language to add a property to enums with the total number of cases.


enum Section {
case Tag
case Article

let cases = Section.caseCount

This would be extremely useful when using enums for tableviews.

What do you think?

João Nunes

Sent from my iPhone

More information about the swift-evolution mailing list