<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 21, 2015 at 1:42 AM, Andyy Hope via swift-evolution <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"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Hi Swift Team and Community</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I’ve put a proposal up on GitHub to add a cases ‘count’ functionality to Enums for the Swift language</div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><a href="https://gist.github.com/andyyhope/2fc5b6bee8ee1346f688" target="_blank">https://gist.github.com/andyyhope/2fc5b6bee8ee1346f688</a></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Comments, feedback, scenario appends very much welcomed. Thank you</div></div></blockquote><div><br></div><div>I would discourage adding just a `.count`. I&#39;ve heard a few people ask for this over the last year. In almost all cases it is due to people falling back to the way they dealt with enums in Objective C when in fact there is usually a better way in Swift.  Adding `.count` would inhibit the discovery of better ways of doing things. </div><div><br></div><div>However, I&#39;m having a hard time arguing against `.cases`. In at least one place I currently have an `.allCases` computed property on an enum. </div><div><br></div><div>--</div><div>bart</div></div><br></div></div>