* Daniel McBrearty <[EMAIL PROTECTED]> [2006-11-17 12:00]: > A global is something that is in the global namespace. > A singleton isn't, any more than other class is. You have to > import the class to which it belongs to use it.
That might be true in Java. It’s patently false in Perl. > Until someone actually presents a solid reason why you should > *never* have a class which can only have a single instance, the > argument is going nowhere, as far as I can see. No, I think the onus is the other way around. I’d like to hear about a case that is much more sensibly be solved using a singleton class rather than by other means of ensuring uniqueness in a higher level of the infrastructure. I don’t want to claim that there is no circumstance in which singletons are useful; I argue with people who claim that every use of GOTO is evil, too. But I doubt that singletons are even as useful as GOTO, in practice. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/> _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
