I think they come in very handy for the Singleton OOP concept. You need to 
have a "factory" that handles the object query/instantiation. If no instance 
is available, it creates a new one (and stores it) and if one is already 
available, it just returns that.
Naturally that looks better to have TSomeClass.GetInstance() instead of 
GetInstanceOfSomeClass() ...
Sure, it's possible to do without class methods, but from an OOP viewpoint it 
just looks and feels wrong ;-) (imho)


Am Donnerstag 14 Januar 2010 01:50:02 schrieb Doug Chamberlin:
> Oh, I can imagine such methods also. And I've used them before. I just
> don't see the big advantage over having them be global
> functions/procedures located in the same unit as the class they operate
> on. So, as often as not, I go and create the global functions instead.
> Never could decide either way to go.
> 
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to