Re: drop singletons in favor of static calls
Manuel Holtgrewe <[email protected]> Tue, 01 Mar 2005 12:55:24 +0100
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
Jean-Christophe Michel schrieb: > Hi, > > Why not keep singletons hidden and use static calls ? > > Instead of doing > $o =& Singleton::getInstance(); > $o->action(); > > we would do > SIngleton::action(); > > and action would in turn do > $o =& Singleton::getInstance(); > if it's not completely static. > > Would spare one line on each call without loosing any feature. > > Could be applied to Conf, Timer, Project... This is only a matter of taste and I like Singletons better. Manuel _______________________________________________ dev mailing list dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected] http://lists.binarycloud.com/mailman/listinfo/dev