Op Fri, 8 Dec 2006, schreef Micha Nelissen:

> Btw, I think singletons are nonsense too. Why is a global variable evil,
> and a singleton class not ?

Well, a singleton can hide and/or protect its private data.

Actually, a unit is a singleton. The procedures are the methodes, the 
interface declares the public methode and the implementation the private 
methods. The constructor is the initialization section and the destructor 
the finalization section.

But, in pure OOP the unit concept does not exist. I interpret the 
singleton as the OOP equivalent of the unit.

Daniël
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to