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

bachmeier no at spam.net
Mon Aug 6 13:28:25 UTC 2018


On Monday, 6 August 2018 at 09:48:30 UTC, Danni Coy wrote:
> Outside perspective here and possibly stupid question. Is there 
> any way we could have our cake and eat it too? One of the 
> thinks I like is that it tends to be much more readable than 
> C++, more code than necessary hurts readability of  that code. 
> Can the compiler warn when a function is called that is 
> shadowed by another function in a different namespace. This to 
> me seems like the most sane solution, what am I missing?

I haven't read all of the posts in this thread, but my 
understanding of Walter's argument is that he believes there is 
only one correct way to work with C++ code. If that's the case, 
there's no need for warnings, because the language should prevent 
you from doing it wrong in the first place. The first step will 
be to convince him that the "mangle only" approach is valid.


More information about the Digitalmars-d mailing list