<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-07-22 2:39 GMT+03:00 Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Jul 21, 2016 at 4:06 PM, Anton Zhilin <<a href="mailto:antonyzhilin@gmail.com">antonyzhilin@gmail.com</a>> wrote:</span><span class=""><br>
> Moreover, types can completely customize contents of their<br>
> 'Mirror's. This is incompatible with laziness and with how reflection should<br>
> work, based on experience from other languages.<br>
<br>
</span>That is actually viewed as a weakness of reflection in other<br>
languages. Allowing reflection to access other types' internal data<br>
and APIs creates barriers for optimization, and facilitates creating<br>
binary compatibility problems when apps include code that uses<br>
reflection to poke at internal data of library types.</blockquote><div><br></div><div>I talked about Swift here. Types can completely customize contents of their Mirrors in Swift. A type, which pretends to be used for reflection, can't afford that.</div></div></div></div>