<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 Mar 17, 2017, at 3:42 PM, Joe Groff 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=""><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="">I hope that Mirror will ultimately be superseded by key paths:<div class=""><br class=""></div><div class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170313/033998.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170313/033998.html</a></div><div class=""><br class=""></div><div class="">Key paths address the mutability limitations of mirror, and give you the ability to work with arbitrary values in a dictionary-like way that Mirror does without an intermediary type. While the initial key path proposal lacks the dynamic discovery of key paths by name/index/etc., that would be a natural future direction to go in. Being able to build or query key paths dynamically would also solve other problems with Mirror, such as not being able to discover the structure of a value without an instance of the value.</div></div></div></blockquote><div><br class=""></div><div>This all sounds so incredible! &nbsp;I’m really looking forward to dynamic discovery and manipulation of key paths, especially without needing an instance of the type to do it. &nbsp;It can’t come soon enough - I already have a project where it could come in very handy!</div><br class=""><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=""><br class=""></div><div class="">-Joe</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 16, 2017, at 2:38 PM, Slava Pestov 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=""><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="">Adding write reflection to the existing Mirrors implementation should not be too difficult and we would accept a well-written PR that adds this capability.<div class=""><br class=""></div><div class="">Slava</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 15, 2017, at 8:10 AM, Dimitri Racordon 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="">

<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="">
Hello fellow evolutionists,
<div class=""><br class="">
</div>
<div class="">I’d like to ask if someone knows about the current state of affairs of the evolution of the reflection API in Swift.</div>
<div class="">I read it was (or at least used to be) in the scope of Swift 4 to improve on the current capabilities, but failed to see any proposal in that direction since then. I found this evolution post (<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151214/003401.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151214/003401.html</a>)
 from quite a while ago, and would like to know if anything progressed since then.</div>
<div class=""><br class="">
</div>
<div class="">As a domain specific languages designer, reflection is an essential feature for me. Unfortunately I think Swift is quite behind regarding that point. Most specifically, the inability to set properties discovered from a mirror (without resorting
 to the black magic of unsafe pointers) has a huge impact on the simplicity of embedded DSLs.</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Dimitri Racordon</div>
<div class=""><br class="">
</div>
</div>

_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>