<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPad</div><div><br>On Jun 4, 2016, at 12:34 AM, Austin Zheng via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8">It seems like it would make sense to model enum subsets as a subtype relationship.<div class=""><br class=""></div><div class="">Is the core team planning on drawing up a structs/enums subtyping proposal later this year?</div></div></blockquote><div><br></div>+1. &nbsp;Subtype relationship is mostly what is desired here. &nbsp;<div><br></div><div>Some people have also talked about members of the supertype also being available on the subtype which would involve implementation inheritance. &nbsp;That could probably be made to work for enums if the subtype receives identical storage and as long as all supertype members are considered final (because value type members are always final). &nbsp;But it's a slippery slope and would likely bloat the storage of many subtype enums.</div><div><br></div><div>-Matthew</div><div><div><br><blockquote type="cite"><div><div class=""><br class=""></div><div class="">Austin</div><div class=""><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 3, 2016, at 10:25 PM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 3, 2016, at 2:35 PM, T.J. Usiyan via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Since this seems to have some interest, I've made a gist.<div class=""><br class=""></div><div class=""><a href="https://gist.github.com/griotspeak/963bc87a0c244c120264b11fb022d78c" class="">https://gist.github.com/griotspeak/963bc87a0c244c120264b11fb022d78c</a></div></div></div></blockquote><br class=""></div><div class="">We have frequently discussed introducing subtype relationships between structs and enums, in an effort to allow limited implicit promotions (e.g. from small integers to wider integers). &nbsp;Wouldn’t that be a more general solution to this same problem?</div><div class=""><br class=""></div><div class="">-Chris</div><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></div></body></html>