On Sunday, 27 April 2014 at 19:54:50 UTC, Walter Bright wrote:
http://wiki.dlang.org/DIP61

Quote:

Unlike C++, namespaces in D will be 'closed' meaning that new declarations cannot be inserted into a namespace after the closing }. C++ Argument Dependent Lookup (aka "Koenig Lookup") will not be supported.

Do I understand it correctly, that if I have namespace members defined in different files, like

// a.cpp
namespace ns { int foo(); }
// b.cpp
namespace ns { int bar(); }

I have the only option to put those in a single D file, like

// c.d
extern (C++, ns) { int foo(); int bar(); }

?

And the only way it's more flexible than the hypothetical extern(C++) module ns; is that you can put several namespaces to a single file?

Reply via email to