Specifying C++ symbols in C++ namespaces

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sun Apr 6 12:39:31 PDT 2014


On Saturday, 5 April 2014 at 23:26:30 UTC, Walter Bright wrote:
> I feel that C++ messed up namespace design because:
>
> 1. namespaces are not closed
> 2. they have no relationship with modules

Namespaces are not as powerful as they could have been, but being 
able to add symbols to an external scope (like classes) is very 
useful if done right (e.g. cross-cutting enhancements, adding 
members to external classes like "saveyourself", "printyourself").

> which has wound up forcing the addition of Yet Another Design 
> when imports and modules are added to C++.

Unfortunately that seems to be years into the future? Although 
clang has begun implementing something:

http://clang.llvm.org/docs/Modules.html

I've got at feeling that if clang gets something working it will 
become a de-facto standard due to demand.


More information about the Digitalmars-d mailing list