Is there any good reason why C++ namespaces are "closed" in D?

Walter Bright newshound2 at digitalmars.com
Mon Jul 30 20:23:25 UTC 2018


On 7/30/2018 9:45 AM, Manu wrote:
> Sure it 'works', but it's an annoying point of friction, and it
> doesn't need to be that way.

You can reduce it to:

     mixin(cppNamespace("ns", "void foo();"));


>> You haven't explained why you can't just move the namespace ns declarations in
>> one file together.
> 
> Are you serious?

Yes, please explain why you can't coalesce the namespace declarations in one C++ 
file into one namespace declaration.


> When torrents of people complain, you can send every single one of
> them to me, tell me "I told you so", and I'll eat my hat.

Apologies don't pay the bills. C++ is full of such stuff, and the bill for it is 
staggering.



More information about the Digitalmars-d mailing list