On 12/24/10, Andrei Alexandrescu <[email protected]> wrote:
> Don't forget to call your program stats.d or put a module stats
> declaration at its top.
>
> Andrei
>

Hardcoding module names in our code?! I beg to differ, sir!

module testmodule;

import std.string : split;
import std.stdio : writeln;

string modulename = split(.stringof)[1];

void main()
{
    writeln(modulename);
}

Reply via email to