Add imports in examples?

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Jul 1 20:18:17 PDT 2011


Ok, see some examples do have imports, here's one few lines down:

import std.conv;
int a;
void fun() { auto b = to!(string)(a); }
auto r = benchmark!fun();
writefln("Milliseconds to call fun() %s times: %s",
    r[0], r[1][0].to!("msecs", int));

I don't see a reason to put imports in some places, but leave them out
in others. A little consistency would be nice, methinks.


More information about the Digitalmars-d mailing list