Viktor Szakáts said:
This looks like a PUBLIC var initialized with
an object from an INIT PROC and protected from
additional instances.
Thanks Viktor
Sure it could be explicitly implemented as you suggested for some cases, but
my intention is to propose a more comprehensive solution.
If singleton clause could be hardcoded in the class declaration, a developer
could program a singleton class and share it with other users without to
care if they know that it has to be instantiated only once or if they know
how to assure acess to a unique instance of it - the class would be a
singleton class and that would be all.
Singleton classes happen in programming because there are singleton objects
in real life, so the native concept of singleton classes in harbour would
make programming safer, easier and clearer.
Regards,
Leandro Damasio
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour