The Opposite of a Singleton?
I was in a design discussion today and mentioned the need for a singleton object in our solution. Further along in the discussion I was trying to find a word that describes the opposite of a singleton, but alas, I struggled to find a word that may or may not exist. I just referred to the inverse object as a "new object." As I pondered this later in the day, I considered adjectives describing the nature of objects. They can be many things, but two concepts that popped into my head to classify them were "complex" and "simple."
I started playing with the words and making them resemble singleton. "Complexton" did not sound right to me. I should mention that I was washing my hands as I was contemplating this. I lifted up my head, looked into the mirror, and thought, "SIMPLETON." The opposite of a singleton is a "simpleton."
If the opposite of a singleton is not a "simpleton," then what is it? Until I find a plausible answer, I will try and insert this new term into my next design discussion.
Filed under: Uncategorized





Maybe you should just refer to them as single-instance and multi-instance classes. That way, when some smartie tries to correct you: “You mean singleton”, you can tell them: “That’s correct. Now tell everyone what a multi-instance class is called.” They’ll probably mumble, scratch their head, and feel like an idiot for the rest of the conversation. Maybe they’ll go home and blog about it. :p
I did see one reference from someone in the Spring group calling it a Prototype… makes a bit of sense, I suppose, but I don’t really consider it an opposite.
Err… multipleton?
I guess to me a interesting side question here is the object enforcing it’s singleton behavior by having a private constructor and a method to return it’s singleton (unique) instance or is the singleton nature of the object enforced by some other object in the class hierarchy?
If the object forces it’s singleton nature it self then it is a particular behavior of the object having to do with it’s instantiation and as such is a creational pattern according to the Gang of Four.
If the object does not implement the Singleton Creational pattern then it is simply an object with no special creational behavior.
Most of the time I have seen this implemented as a external property that enforces the singleton nature of the object as a Business rule, however there are cases where a true singleton patten is used. I always kind of wonder what would drive the actual object to this restriction though. It seems that this implements a very restrictive behavior and would make the class less useful.
So I think you are not looking for a new name in particular. You are just using a shorthand to describe the creational pattern of a particular object. Other objects simply do not have the restriction on how they are created.
The Castle project uses the word “transient” as the opposite of singleton.
I don’t think it makes sense to talk of the opposite of a Singleton.
I see Singleton as Factory and instance as Object produced by Factory.
Just as car factory produces instances of Car.
What’s the point in asking what the opposite of a car-factory is?