Why modules is so strongly limited?
imbaFireFenix via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 13 13:58:02 PDT 2016
Hello my friends!
I'm new user of D language and leaarning how it works.
I'm know C++ and trying Rust, GO and some else and now - D is the
best language for me
But I'm confused... Many coders was great work and interesting
features, but modules is so strongly limited!!!
https://dlang.org/spec/module.html
Only one module per file.
but Rust and beta VC++ can multiple file to one module! Why
implemented this limit?
Why modules not written as mix of C# namespace and C++
translation unity? It will be greatly!
But for now for huge project need to do:
~~~ ~~~ ~~~
module M1;
class M1
{
}
~~~ ~~~ ~~~
module M2;
import M1;
public alias M1 = M1.M1;
~~~ ~~~ ~~~
import M2;
int main()
{
M2.M1 Something;
}
~~~ ~~~ ~~~
Thanks.
More information about the Digitalmars-d
mailing list