<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I am NOT saying “here’s the answer”, but I put something up on my github that does some of this: <a href="https://github.com/TheOtherDave/EnumEnhancer" class="">https://github.com/TheOtherDave/EnumEnhancer</a><div class=""><br class=""></div><div class="">Again, not saying that’s how we should do it or anything, but if anyone thinks it’d be useful until the “official” enhancements come out, help yourself. There’ll still be boilerplate, but it makes some attempt to keep things correct.</div><div class=""><br class=""><div class="">
- Dave Sweeris
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jan 17, 2016, at 15:44, Jacob Bandes-Storch via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><span style="font-size:12.8px" class="">Hi folks,</span><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">I've drafted a proposal to add a CaseEnumerable protocol, which will derive a static variable "cases" for enum types. Feedback is welcome, especially for refining the proposal before I submit a formal PR.</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">The draft is here; full text below. <a href="https://github.com/jtbandes/swift-evolution/blob/977a9923fd551491623b6bfd398d5859488fe1ae/proposals/0000-derived-collection-of-enum-cases.md" target="_blank" class="">https://github.com/jtbandes/swift-evolution/blob/977a9923fd551491623b6bfd398d5859488fe1ae/proposals/0000-derived-collection-of-enum-cases.md</a></div></div></div></div></div></div></div></blockquote></div><br class=""></div></body></html>