tag:blogger.com,1999:blog-6977069.post1792206876845664037..comments2022-10-27T11:40:01.409+02:00Comments on Hallvard's Blog: TDM#7: Design Patterns; SingletonHallvards New Bloghttp://www.blogger.com/profile/09527199955524812466noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6977069.post-66046350012217220922008-03-14T19:55:00.000+01:002008-03-14T19:55:00.000+01:00> A unit itself is a singleton-like entity.Yes, th...> A unit itself is a singleton-like entity.<BR/><BR/>Yes, that is true, but it does have a number of disadvantages, like namespace pollution, no properties, no inheritance and so on.<BR/><BR/>Another alternative that makes sense now that we have proper class vars, class properties etc is to let the singleton be an abstract class with only class-level members.Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-84732035098878981892008-03-14T07:54:00.000+01:002008-03-14T07:54:00.000+01:00A unit itself is a singleton-like entity. Which pr...A unit itself is a singleton-like entity. Which property was used in your code (SingletonInstances and SingletonClasses variables).<BR/>Therefore there is no need in class-based singleton unless you are an OOP-maniac.;)Anonymousnoreply@blogger.com