<div class="gmail_quote">On Mon, Jul 9, 2012 at 9:37 PM, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Monday, July 09, 2012 20:42:47 Gor Gyolchanyan wrote:<br>
> Currently, code introspection in D is way worse, then it should be. And<br>
> this is true for both compile-time and run-time introspection.<br>
> Moreover, the available stuff is bugged out in the most critical places.<br>
> I'd like to hear what people think would be a better way to handle<br>
> code introspection.<br>
<br>
</div></div>You mean reflection?<br>
<span class="HOEnZb"><font color="#888888"><br>
- Jonathan M Davis<br>
</font></span></blockquote></div><br>I mean compile-time and run-time information like:<div> * What are the types this one can implicitly/explicitly convert to/from?</div><div> * What does this alias point to (variable/type/template/function)?</div>
<div> * What is the protection of this alias?</div><div> * What aliases does this one contain?</div><div> * What are the instances of this template?</div><div> * What are the available types (including/excluding template instances)?</div>
<div> * What modules are being compiled and what modules do they import?</div><div> * What packages are visible from the specified import paths?</div><div><div><br></div><div>This kind of information can allow enormously powerful libraries to be built. For instance python-style dynamic type subsystem, which flawlessly integrates with existing static type system, making D the first ever hybrid static-dynamic typed language. This will include making functions and templates dynamic:</div>
<div><ul><li>Templates transformed into partially dynamically-typed functions/classes or associative arrays (in case of template variables).</li><li>Function and template overloading make dynamic, creating multi-dispatch functions.</li>
</ul></div><div>-- </div>Bye,<br>Gor Gyolchanyan.<br>
</div>