[swift-evolution] Proposal: Enum 'count' functionality
jtbandes at gmail.com
Mon Dec 21 13:52:35 CST 2015
I brought up this topic a couple weeks ago in a thread called "List of all
Enum values (for simple enums)":
I suppose it's time to start synthesizing those ideas/discussion into a
On Mon, Dec 21, 2015 at 8:35 AM, Stephen Celis via swift-evolution <
swift-evolution at swift.org> wrote:
> On Dec 21, 2015, at 11:27 AM, Nevin Brackett-Rozinsky <
> nevin.brackettrozinsky at gmail.com> wrote:
> Would .cases return the enum’s cases in source-code order? That seems
> fragile at first glance.
> It might be worth considering to have it return an unordered collection
> (set) instead.
> Care to elaborate on why you think it may be fragile?
> 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.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution