This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: built-in Singleton language construct
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
When reviewing 3rd party code, i find many spots where a singleton concept would be a perfect fit but wasnt used. I dont know why it wasnt used, there could be various reasons like (a) not enough skill, (b) too lazy to create the additional constructs inside the class or (c) design error. So for the next language, my wishlist to the language designers is an build-in singleton concept. Someting like:
SantaClaus santa = newone SantaClaus();
Perhaps there could be more pattern based build-in things inside a language. I know that pushing this ideas too far will lead to some 4GL kind of language, but if you stay on implementing pattern concepts, you are still far away from real 4GL stuff.