
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 26 January 2010, GMan wrote:
Take your best singleton class, but remove the bit where it intrudes and forces only a single instantiation. Call this "global", which provides the same thing as a singleton but allows other instantiations of the class. My argument was that this class is more worth boost's time than the singleton class. The reason being, users of global could always re-introduce the single-instantiation behavior, but don't have to. This provides more flexibility.
If you peel off the singleton aspect of singletons, you're left with global state and lazy initialization. A facility that supports thread-safe lazy initialization might be useful, but why tie it to global state (which is of more dubious value)? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAktfYkcACgkQ5vihyNWuA4XUeACdHM9zyWX13SGz5ZF1iHLoWXJz C/cAn05tGtPIN6N7YhF4IrDpnsJN4wqd =rfHe -----END PGP SIGNATURE-----