Some criticism for all the mentioned variants:

enum Something : raw(Int32)
Requires adding a new contextual keyword.

enum Something : RawRepresentable
With additional typealias RawValue, the simplest cases will lose their
elegancy.

enum Something : RawRepresentable<Int32>
+1. But we don’t have generic protocols right now :(

enum Something<Int32>
-1. This way we would just trade overloading conformance syntax for
overloading generics syntax.
​
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to