static class Foo {}
    mandel 
    oh at no.es
       
    Sun Dec  2 13:51:57 PST 2007
    
    
  
bearophile wrote:
> D has modules and packages as Python, use them.
Local namespaces have their purpose as
nested classes and functions do have.
Having files/modules for them is a blunt instrument.
I thought of
static class Foo
{
  uint a;
  uint b;
}
as a shortcut for smth. similar to
class Foo
{
  static uint a;
  static uint b;
}
But with the difference that a "static class" wouldn't allow to be 
instanciated (singleton out fo the box).
    
    
More information about the Digitalmars-d-learn
mailing list