Package Class

last modified: April 30, 2004

A CeePlusPlus idiom where a class is used as a namespace, in order to implement pseudo-packages. Some say this is unnecessary, given that C++ also has namespaces. However, it is occasionally useful.

Consequences:

This works well enough in JavaLanguage too. Of course, Java has true "packages"; which are similar to the PackageClass (except that they are singletons by default).


See also PackageDesign


Loading...