DIP61: Add namespaces to D
Jason King via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 26 07:54:56 PDT 2014
Is there some reason why
extern(c++, std::printf);
is rejected?
If the purpose here is to map c++ code and we are only worried
about namespaces in the c++ context, why not just make it
identical to the c++ declaration?
A pragma to indicate the name mangling scheme since MS and GCC
use different algorithms and possibly a block element to say
everything under here is in this namespace, may
extern(c++namespace, std) {
extern(c++,printf);
extern(c++,open);
}
I know my examples in real code would be extern(c) but this is
just for example purposes.
Having both namespaces and modules available in general D code is
needless complexity IMHO.
More information about the Digitalmars-d
mailing list