<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="">Hi Xiaodi,<div class="">please read in-line, thank you.</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 12 Oct 2016, at 15:58, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 12, 2016 at 7:47 AM, Ted F.A. van Gaalen <span dir="ltr" class=""><<a href="mailto:tedvgiosdev@gmail.com" target="_blank" class="">tedvgiosdev@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><br class=""><div class=""><span class="gmail-"><blockquote type="cite" class=""><div class="">On 11 Oct 2016, at 23:04, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank" class="">xiaodi.wu@gmail.com</a>> wrote:</div><br class="gmail-m_-5180192693485377350Apple-interchange-newline"><div class="">Reflection is likely to be tackled in Swift 5, no? </div></blockquote><br class=""></span><div class="">I'd think you don’t need reflection that much, because defining</div><div class="">dynamic classes (and other entities) are solely incremental compiler</div><div class="">tasks, for which it can use previously compiled meta reference</div><div class="">information (xref symbols etc). </div><div class=""><br class=""></div><div class="">Imho in that perspective it is more or less independent</div><div class="">of reflection. Reflection is as far as I can see is more intended to offer </div><div class="">meta information at the programming level.? </div><span class="gmail-"><div class=""><br class=""></div><blockquote type="cite" class=""><div class="">So realistically, this could be on track for Swift 6 or 7. </div></blockquote><br class=""></span>As already written, there is no timeframe/deadline for this idea, it is just an idea, </div><div class="">not a proposal (yet).</div><span class="gmail-"><div class=""><div class=""><br class=""><blockquote type="cite" class="">Let's postpone discussion until then.<br class=""></blockquote><div class=""><br class=""></div></div></div></span><div class="">Feel free to do so, but why postponing having ideas and discussing them?</div></div></blockquote><div class=""><br class=""></div><div class="">The core team has requested that discussions be focused on the priorities identified for the current phase of Swift 4. There's a sound rationale for this request. Per Chris: "<span style="white-space: pre-wrap;" class="">The community benefits from keeping focus on a limited number of topics, because if there is too much going on, no one can follow and keep track of it all. It is important for the core team to be involved in key discussions up front. In the Swift 3 cycle, it was problematic that many folks had no time to follow the threads until after the review period completed.”</span></div></div></div></div></div></blockquote><div><br class=""></div><div>You are pulling the above out of context hereunder: </div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><font class=""><span style="white-space:pre-wrap" class="">I'm sure many people have ideas about dynamic facilities in Swift, as do we all about other ideas, and many have been trying to be respectful of this new proposed process. I think we can all agree that maximum participation and the best solutions are most likely when everyone stays on the same page with regard to the process by which we go about these discussions. No need to postpone having ideas about Swift or talking about them with your friends and colleagues, but let's respect the core team's urging to postpone discussing them on this particular list for the reasons identified above.</span></font></div><div class=""><br class=""></div></div></div></div></div></blockquote><div>1. You are not a member of the core team, far from it, sorry.</div><div> Don’t think for them, they can do that quite well themselves. and thus: </div><div><br class=""></div><div>2. If the core team would have problems with me bringing forward this topic, </div><div> they might/will inform me that this is undesired, in that case I’ll stop writing about it. </div><div><br class=""></div><div>3. My current subject is an extension spin-off from the topic “associated objects”, wherein</div><div> “extending the language" is discussed. Meta Programming and Adding Dynamic Features to Swift </div><div> are currently strongly in focus and is surely one of the most important things to bring to Swift in the near future!</div><div><br class=""></div><div>4. read this on <a href="http://Swift.org" class="">Swift.org</a>: </div><div><h3 id="proposing-new-features" style="box-sizing: border-box; margin: 0px 0px 0.5em; padding: 1em 0px 0px; font-weight: 400; line-height: 1; color: rgb(51, 51, 51);" class=""><span style="font-size: 12px;" class="">"Proposing New Features"</span></h3><p style="box-sizing: border-box; margin: 0px 0px 1.5em; padding: 0px; color: rgb(51, 51, 51);" class="">"New features or directions for the Swift language can come from anyone with a good idea."</p><p style="box-sizing: border-box; margin: 0px 0px 1.5em; padding: 0px; color: rgb(51, 51, 51);" class="">"Open discussion and iteration over the ideas in a public forum is essential to reaching the best possible solutions."</p><div class="">also </div><div class=""><br class=""></div><div class=""><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);" class="">"Everyone is welcome to propose, discuss, and review ideas to improve the Swift language and standard library on the </span><a href="https://swift.org/community/#swift-evolution" title="Swift evolution mailing list" style="box-sizing: border-box; -webkit-text-decoration-skip: objects; color: rgb(64, 120, 192); text-decoration: none;" class="">swift-evolution mailing list</a><span style="background-color: rgb(255, 255, 255);" class=""><font color="#333333" class="">.” </font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#333333" class=""><br class=""></font></span></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div>5. If a certain topic is not interesting for you personally then simply ignore it and don’t react.</div><div><br class=""></div><div>6. Well meant advice: be a little less lofty,</div><div> </div><div><br class=""></div><div>Kind Regards </div><div>TedvG</div><div><br class=""></div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">In this case for instance, thinking about dynamic facilities, will presumably </div><div class="">also influence thinking about reflection and vice versa. </div><div class="">Thinking “wider” and “further” broadens the horizon of course.</div><div class="">For example. what about a compiler/interpreter self improving based on artificial intelligence? is this 2016? </div><div class="">So one can (should) do both: that is think in small steps, like discussing</div><div class="">“just” language elements and at the same time have an eye (or two) for the </div><div class="">broader picture. If one concentrates too much on the direct path in front, one might</div><div class="">not see other paths or what lays further ahead, which limits progress. </div><div class=""><br class=""></div><div class="">————————————————</div><div class="">Let me write a small cartoon here, just intended as a little bit of humour just to illustrate this:</div><div class=""><br class=""></div><div class="">A few thousand years ago, two very nice beings ( just returned from attending a</div><div class="">very primitive and awkward election debate, still shivering), looking at a pair </div><div class="">of fairly round stone slabs with a hole in the centre.</div><div class=""><br class=""></div><div class="">“What’s this ?, Why round? why the holes? Nice job, but what is it? Is it art?”</div><div class=""><br class=""></div><div class="">“Errrrhmm, well.. I might call it ‘Wheelz', not sure yet, you can use two of more of them</div><div class="">underneath or aside of things you’d like to move around more easily…</div><div class="">with less friction, which was a hell of a drag anyway."</div><div class=""><br class=""></div><div class="">The other guy walks around it, apparently deeply thinking about it. </div><div class="">after some silence he says:</div><div class="">“Aha… hmm.. well.. Oh, i see, yeah, yep, that’s kinda cool.. might be useful. </div><div class="">But let’’s postpone discussing it until ball-bearings have been invented. “</div><div class="">————————————————</div><div class=""><br class=""></div><div class="">hmmm, I really have too much time… :o)</div><div class=""><br class=""></div><div class="">Kind Regards</div><span class="gmail-HOEnZb"><font color="#888888" class=""><div class="">Ted</div></font></span><span class="gmail-"><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><br class=""><blockquote type="cite" class=""><div class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Oct 11, 2016 at 15:59 David Sweeris via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto" class="gmail-m_-5180192693485377350gmail_msg"><div class="gmail-m_-5180192693485377350gmail_msg"><br class="gmail-m_-5180192693485377350gmail_msg"></div><div class="gmail-m_-5180192693485377350gmail_msg">On Oct 11, 2016, at 12:40, Anton Zhilin via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="gmail-m_-5180192693485377350gmail_msg" target="_blank">swift-evolution@swift.org</a>> wrote:<br class="gmail-m_-5180192693485377350gmail_msg"><br class="gmail-m_-5180192693485377350gmail_msg"></div><blockquote type="cite" class="gmail-m_-5180192693485377350gmail_msg"><div dir="ltr" class="gmail-m_-5180192693485377350gmail_msg"><div class="gmail-m_-5180192693485377350m_-1272261771439787227markdown-here-wrapper gmail-m_-5180192693485377350gmail_msg"><p style="margin:0px 0px 1.2em" class="gmail-m_-5180192693485377350gmail_msg">Hello Ted,<br class="gmail-m_-5180192693485377350gmail_msg">First of all, this topic belongs to reflection, which is specifically stated to be out of scope of Swift 4 Phase 1. So all considerations are purely theoretical for now.<br class="gmail-m_-5180192693485377350gmail_msg">That said, I also thought about this problem. The best I could imagine is something along the following lines:</p>
<pre style="font-family:consolas,inconsolata,courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class="gmail-m_-5180192693485377350gmail_msg"><code class="gmail-m_-5180192693485377350m_-1272261771439787227language-swift gmail-m_-5180192693485377350gmail_msg gmail-m_-5180192693485377350m_-1272261771439787227hljs" style="font-size:0.85em;font-family:consolas,inconsolata,courier,monospace;margin:0px 0.15em;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em;color:rgb(51,51,51);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:rgb(248,248,248);display:block"><span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-keyword gmail-m_-5180192693485377350gmail_msg" style="color:rgb(51,51,51);font-weight:bold">var</span> builder = <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">StructBuilder</span>(name: <span class="gmail-m_-5180192693485377350gmail_msg gmail-m_-5180192693485377350m_-1272261771439787227hljs-string" style="color:rgb(221,17,68)">"Person"</span>)
builder.addProperty(name: <span class="gmail-m_-5180192693485377350gmail_msg gmail-m_-5180192693485377350m_-1272261771439787227hljs-string" style="color:rgb(221,17,68)">"name"</span>, type: <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">String</span>.<span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-keyword gmail-m_-5180192693485377350gmail_msg" style="color:rgb(51,51,51);font-weight:bold">self</span>)
builder.addProperty(name: <span class="gmail-m_-5180192693485377350gmail_msg gmail-m_-5180192693485377350m_-1272261771439787227hljs-string" style="color:rgb(221,17,68)">"age"</span>, type: <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">Int</span>.<span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-keyword gmail-m_-5180192693485377350gmail_msg" style="color:rgb(51,51,51);font-weight:bold">self</span>)
builder.addComputedProperty(<wbr class="">name: <span class="gmail-m_-5180192693485377350gmail_msg gmail-m_-5180192693485377350m_-1272261771439787227hljs-string" style="color:rgb(221,17,68)">"description"</span>, getter: { (this: <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">Any</span>) -> <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">String</span> <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-keyword gmail-m_-5180192693485377350gmail_msg" style="color:rgb(51,51,51);font-weight:bold">in</span> ... })
builder.addComformance(<span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">CustomS<wbr class="">tringConvertible</span>.<span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-keyword gmail-m_-5180192693485377350gmail_msg" style="color:rgb(51,51,51);font-weight:bold">self</span>)
<span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-keyword gmail-m_-5180192693485377350gmail_msg" style="color:rgb(51,51,51);font-weight:bold">let</span> type: <span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">Any</span>.<span class="gmail-m_-5180192693485377350m_-1272261771439787227hljs-type gmail-m_-5180192693485377350gmail_msg" style="color:rgb(68,85,136);font-weight:bold">Type</span> = builder.build()
</code></pre><p style="margin:0px 0px 1.2em" class="gmail-m_-5180192693485377350gmail_msg">Obviously, to interact with such dynamic types and their objects, we need the whole working reflection system that we don’t have right now.</p></div></div></blockquote></div><div dir="auto" class="gmail-m_-5180192693485377350gmail_msg">I *think* that's only true for non-generic code, and types that aren't subclasses... I think...<div class="gmail-m_-5180192693485377350gmail_msg"><br class="gmail-m_-5180192693485377350gmail_msg"></div><div class="gmail-m_-5180192693485377350gmail_msg">Anyway, I'm starting to wonder if some code I'm trying to write might be impossible without either this feature, or some/all of the stuff from the generics manifesto. So put me down as, in principle, a strong +1 (pending details of the proposal when it actually gets written for Swift 10).</div><div class="gmail-m_-5180192693485377350gmail_msg"><br class="gmail-m_-5180192693485377350gmail_msg"></div><div class="gmail-m_-5180192693485377350gmail_msg">- Dave Sweeris </div></div>______________________________<wbr class="">_________________<br class="gmail-m_-5180192693485377350gmail_msg">
swift-evolution mailing list<br class="gmail-m_-5180192693485377350gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail-m_-5180192693485377350gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail-m_-5180192693485377350gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail-m_-5180192693485377350gmail_msg" target="_blank">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class="gmail-m_-5180192693485377350gmail_msg">
</blockquote></div>
</div></blockquote></div><br class=""></span></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></div></body></html>