<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 28, 2017, at 4:07 PM, Jordan Rose via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div 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;" class="">My point is we can't use our usual mangling in the string, because that contains type names.</div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">We could invent a ‘mangling’ format (either using the existing demangler with a special flag or something else) where types inside the module are encoded as a pointer to a nominal type descriptor or something.</div><div class=""><br class=""></div><div class="">This would be useful for remote reflection as well, for secrecy and efficiency reasons.</div><div class=""><br class=""></div><div class="">Also being able to build metadata from a mangling will allow the standard library’s Mirror type to use the reflection metadata, instead of a ‘field type accessor’ which is emitted by IRGen for each value type, saving on code size.</div><div class=""><br class=""></div><div class="">Slava</div></body></html>