<div dir="ltr">I brought up this topic a couple weeks ago in a thread called "List of all Enum values (for simple enums)":<div><br></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001233.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001233.html</a><br></div><div><br></div><div>I suppose it's time to start synthesizing those ideas/discussion into a proposal :)</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Mon, Dec 21, 2015 at 8:35 AM, Stephen Celis via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></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"><span class=""><div><blockquote type="cite"><div>On Dec 21, 2015, at 11:27 AM, Nevin Brackett-Rozinsky <<a href="mailto:nevin.brackettrozinsky@gmail.com" target="_blank">nevin.brackettrozinsky@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Would .cases return the enum’s cases in source-code order? That seems fragile at first glance.<div><br></div><div>It might be worth considering to have it return an unordered collection (set) instead.</div></div></div></blockquote><br></div></span><div>Care to elaborate on why you think it may be fragile?</div><div><br></div><div>Retaining order makes sense to me given that integer-backed enumerations auto-increment and that enumerations cannot be extended with new cases. I'm not opposed to using a set, though, if that makes more sense.</div><div><br></div><div>Stephen</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=P-2BsYbBZHRBuLDBJaL4DIKDNfkkjpROowTyRAObV11qz-2BlWISDIWx5KTzVEuc7Ura65Ls-2BOnZvmq1jNshAhVy784qTc7FW9QunMu3rnUkaTK3KamSfyI-2FJhIbkN27pUH5DozjvITF7cRxzJ3qxx0Epp-2F1-2FBc2NHyI886pdy0w3pjR83bU2ZKUKuE7bqUaj74nVVOlulXgRSWauNmArN7yQY9-2FrfHqY7JuFuUpN9D31do-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
</div>
<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>
<br></blockquote></div><br></div></div>