On 09.04.2016 6:49, Brent Royal-Gordon wrote:
(tl;dr: will Swift 3.0 improve iteration for enum values? Some kind of .next() 
method for values or .all[] property. Currently we have a problem with this.)

There are proposals to do this, but they're on hold at the moment because the 
guy who was the main driving force got busy with meatspace things. Roughly, you 
would be able to conform an enum to a ValuesEnumerable protocol which would 
automatically synthesize an `allValues` static property on it. You could use an 
extension to do this to an enum that didn't belong to you, so you could get 
this even if the original author didn't think to add it.


Could you provide a little more information about this ValuesEnumerable protocol? My Swift says it doesn't know about such protocol.
Strange, but goggle knows nothing about
'swift "ValuesEnumerable"'
But I can see ValuesEnumerable in some articles related to C#.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to