> On Dec 21, 2015, at 11:27 AM, Nevin Brackett-Rozinsky 
> <[email protected]> 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.

Stephen
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to