[swift-evolution] Fixing raw enum types

Anton Zhilin antonyzhilin at gmail.com
Tue Jan 17 11:54:09 CST 2017

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

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170117/50e20f1f/attachment.html>

More information about the swift-evolution mailing list