What to do about dpointers
David Faure
faure at kde.org
Sat May 19 21:41:06 BST 2007
On Saturday 19 May 2007, Oswald Buddenhagen wrote:
> On Friday 18 May 2007, Andreas Pakulat wrote:
> > I'd like to know what do you kdelibs people do wrt to classes that
> > don't have private members (at the moment) and no dpointer? Do you add
> > a dpointer and private class and just initialize the dpointer to 0?
> > Whats the common practice for this?
> >
> hmm, if a class has no private members and it is a lib class, it has no
> members at all, no? that means it is stateless which in turn means it
> should contain only static functions which in turn means it should be a
> namespace.
Only if you're 100% sure it will never need any state...
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list