The review of SE-0194 has ended. The proposal is accepted with revisions. The specific changes to the proposal as reviewed are:
@objcenums defined in Swift will receive automatic synthesis of the list of all cases. There is no technical basis for limiting synthesis to non-
@objcenums. Note that this change does not affect enums defined in (Objective-)C: Swift will (still) not synthesize the list of all cases for imported enums.
Unavailable cases will not be listed, because values of an unavailable case cannot exist in a well-typed Swift program (in breaks the availability model).
Automatic synthesis is only provided when the conformance is stated on the
enumdefinition (not an extension), following the precedent set by
The protocol, associated type, and property are named
allCases, respectively. The core team felt that these names reflect the primary use case of this protocol, promoting better clarity for most code that iterates over all of the cases. We chose
Enumerablehas some incorrect connotations (e.g., the
Thank you to the proposal authors and implementer, and everyone who participated in the review!