<br><br><div class="gmail_quote">On Thu, Aug 26, 2010 at 22:37, bearophile <span dir="ltr">&lt;<a href="mailto:bearophileHUGS@lycos.com">bearophileHUGS@lycos.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Philippe Sigaud:<br>
<div class="im">&gt; does anyone of you know a way to get the name of the current module at<br>
&gt; compile-time?<br>
<br>
</div>It&#39;s one of the missing pieces of the static reflection:<br>
__traits(thisModuleName)<br><br></blockquote><div>I want this to return an expression tuple with all the package / module hierarchy:  &quot;std&quot;, &quot;stdio&quot;. That way, I can easily find the package name too... *daydreaming*<br>
<br>Maybe a generic __traits(thisScopeName) could be interesting: at the root of a module, it gives the module name, in a function, the function name, class name, etc.<br><br><br>Philippe<br> <br></div></div>