<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">Some criticism for all the mentioned variants:</p>
<p style="margin:0px 0px 1.2em!important"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">enum Something : raw(Int32)</code><br>Requires adding a new contextual keyword.</p>
<p style="margin:0px 0px 1.2em!important"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">enum Something : RawRepresentable</code><br>With additional <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">typealias RawValue</code>, the simplest cases will lose their elegancy.</p>
<p style="margin:0px 0px 1.2em!important"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">enum Something : RawRepresentable&lt;Int32&gt;</code><br>+1. But we don’t have generic protocols right now :(</p>
<p style="margin:0px 0px 1.2em!important"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">enum Something&lt;Int32&gt;</code><br>-1. This way we would just trade overloading conformance syntax for overloading generics syntax.</p>
<div title="MDH:U29tZSBjcml0aWNpc20gZm9yIGFsbCB0aGUgbWVudGlvbmVkIHZhcmlhbnRzOjxkaXY+PGJyPjwv
ZGl2PjxkaXY+YGVudW0gU29tZXRoaW5nIDogcmF3KEludDMyKWAmbmJzcDs8L2Rpdj48ZGl2PlJl
cXVpcmVzIGFkZGluZyBhIG5ldyBjb250ZXh0dWFsIGtleXdvcmQuPC9kaXY+PGRpdj48YnI+PC9k
aXY+PGRpdj5gZW51bSBTb21ldGhpbmcgOiBSYXdSZXByZXNlbnRhYmxlYDwvZGl2PjxkaXY+V2l0
aCBhZGRpdGlvbmFsIGB0eXBlYWxpYXMgUmF3VmFsdWVgLCB0aGUgc2ltcGxlc3QgY2FzZXMgd2ls
bCBsb3NlIHRoZWlyIGVsZWdhbmN5LjwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+YGVudW0gU29t
ZXRoaW5nIDogUmF3UmVwcmVzZW50YWJsZSZsdDtJbnQzMiZndDtgPC9kaXY+PGRpdj4rMS4gQnV0
IHdlIGRvbid0IGhhdmUgZ2VuZXJpYyBwcm90b2NvbHMgcmlnaHQgbm93IDooPC9kaXY+PGRpdj48
YnI+PC9kaXY+PGRpdj5gZW51bSBTb21ldGhpbmcmbHQ7SW50MzImZ3Q7YDwvZGl2PjxkaXY+LTEu
IFRoaXMgd2F5IHdlIHdvdWxkIGp1c3QgdHJhZGUgb3ZlcmxvYWRpbmcgY29uZm9ybWFuY2Ugc3lu
dGF4IGZvciBvdmVybG9hZGluZyBnZW5lcmljcyBzeW50YXguPC9kaXY+" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div>