- From: <keshlam@us.ibm.com>
- Date: Tue, 28 Jul 1998 20:34:57 -0400
- To: www-dom@w3.org
In Java, you can create an object that has no public constructor, in which case "new" will simply not be available. That's part of how one enforces singletons and factories and static-only classes and some of the other design patterns. (Gods know I've done it accidentally enough times.) This does require that you not inherit from anything that has a public constructor, and/or that you override it to private. Can't vouch for Smalltalk; I can sometimes read the language but have never written it.
Received on Tuesday, 28 July 1998 20:52:52 UTC