name guess by the compiler
Jonathan M Davis
jmdavisProg at gmx.com
Thu Nov 25 02:52:35 PST 2010
On Thursday 25 November 2010 02:10:29 spir wrote:
> PS: for got to ask: is there any kind of namespace in D -- especially one
> kind usable for module export?
The module _is_ the namespace. Classes and structs then create namespaces within
the module. If you want to create a namespace within a module but aren't looking
to really create an object, I would suggest creating a final class whose default
constructor is marked with @disable, and then make all of its functions static.
The class is then unconstructable and underivable, and it then serves as a
namespace of sorts.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list