Many questions
Fractal
d294934 at bsnow.net
Mon May 4 16:23:08 PDT 2009
> That's debatable. The hateful thing about namespaces is that they give
> you absolutely ZERO clue as to where any particular thing is coming from.
>
> If I see "tango.io.device.File", I know exactly where the source for
> that module is.
>
> -- Daniel
Yes it is true. But the thing is not "where is it". The thing that i want to remark is "what long".
If you use a namespace, you can write many big classes in separate files without problem, and also, with the same namespace. (and also allowing separate a multiplatform class in different files, for each one).
With modules you are limited in a single file. And it will grow potentially with multiplatform code, and makes hard to find a error or line...
Added to it, the amout of version statements.
Also Namespaces can use upper case characters... documentation indicates that package and module names should be written all in lower case.
A good point for modules is the permisson to access private or protected members of types declared in the same module or package, without the "friend" keyword anywhere.
In namespaces, it can be done by sharing access to all namespace types.
Really module, packages, and namespaces are the same thing. The unique thing that i want, is the possibility of use many files as one (for modules)
More information about the Digitalmars-d
mailing list