https://issues.dlang.org/show_bug.cgi?id=16532
Mathias Lang <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m --- Comment #4 from Mathias Lang <[email protected]> --- > Really namespaces already exist in D, just they are very crudly implemented > by either meaning horrible to maintain with a bunch of extra module files or > through the use of structs. Adding namespaces would just be for sanity so > that code like above isn't possible and so that namespaces are treated as > such. As well adding namespace keyword will also help port from C++ if there > is any code that needs it. Just a thought for a small improvement. First, this is an enhancement proposal, thus it should go through the DIP process: https://github.com/dlang/DIPs/ Second, namespacing in D are supported through module / packages. You can choose to introduce extra namespacing without introducing new modules/packages by using aggregates as already mentioned, but it sounds like your real problem is trying to code with a C++ approach in D. --
