This works:
----
import std.stdio;
void main(){
        writeln(std.conv.to!double(1));
}
----

This doesn't compile:
----
import std.stdio;
void main(){
        std.stdio.writeln(std.conv.to!double(1));
}
----
=>Error: undefined identifier std

So it seems for conv, import std.conv is not needed, but for writeln, import std.stdio is needed. Why?

Also, I always get link errors when using those "implicit imports" for my own modules and using "rdmd". Is there a way to allow this without link errors in the following (using rdmd) ?
----
void main(){
        mypackage.mymodule.myfun(0);
}
----
which would behave as:
----
import mypackage.mymodule;
void main(){
        myfun(0);
}
----




Reply via email to