<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 30, 2017, at 5:34 PM, Tino Heth <<a href="mailto:2th@gmx.de" class="">2th@gmx.de</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">If you read my reply to Daniel Vollmer, you’ll find that we’re thinking about the exact same thing. </span></div></blockquote>Good to hear — read that post later, but I guess repeating doesn't hurt here: People still talk about macros... ;-)</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><div class=""><div class="">So while I think they’re both great features to have, I assume the core team will have higher priorities on their schedule, as I don’t see how these features wouldn’t eat up most resources for at least (!) one Swift release-cycle.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">That’s just it: the core team is already prioritizing a lot of features that would greatly benefit from this. In fact, if this would be implemented, a large portion of the swift compiler could be moved into the standard library, because it wouldn’t be magic any more. This would single-handedly reduce the implementation time and effort of most proposals by a very large margin.</div></blockquote></div><div class="">… and I like specific examples ;-), so out of my head, four features that people want to have and that could be added easily with "Meta-Swift":</div><div class="">- Forwarding of protocol conformance (Kotlin, for example, has this: When a member conforms to a protocol, you don't have to write a bunch of methods that just say "let my member do this")</div><div class="">- init with reduced boilerplate</div><div class="">- Subtyping for non-class types, including a "newtype" option</div><div class="">- Property behaviours</div></div></div></blockquote><div><br class=""></div><div>The first and third items in that list seem similar to the “strong type-alias” idea I just updated (at <<a href="https://gist.github.com/CTMacUser/c493f775075e946efdcfd85d38473291" class="">https://gist.github.com/CTMacUser/c493f775075e946efdcfd85d38473291</a>>). Is it close to what you’re talking about? I did the update because I recently looked up product and sum types again, and saw things called subtypes and quotient types. I realized that, with a little tweaking, strong-type-aliases could what would be needed to model sub- and quotient types.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Imho the reflection capabilities that are needed to make the feature fly are the big tasks — using this information shouldn't be that hard, as it's just a explicit way of telling the compiler what to do.</div><div class="">Assuming that reflection will be improved anyways, it might be a very cheap feature with huge benefit.</div></div></div></blockquote></div><br class=""><div class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">— </div><div class="">Daryle Walker<br class="">Mac, Internet, and Video Game Junkie<br class="">darylew AT mac DOT com </div><div class=""><br class=""></div></div></div></div></body></html>