On Thu, Aug 26, 2010 at 22:37, bearophile <[email protected]> wrote:
> Philippe Sigaud: > > does anyone of you know a way to get the name of the current module at > > compile-time? > > It's one of the missing pieces of the static reflection: > __traits(thisModuleName) > > I want this to return an expression tuple with all the package / module hierarchy: "std", "stdio". That way, I can easily find the package name too... *daydreaming* 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. Philippe
