The syntax pattern structurally provides the fact that you can never have more than one instance of a class at a time , and it is obvious to the developers that they are dealing with singleton.
Monostat applies behavior of a singleton without the structure of the monostate .
You may find situations where you still need instance data. Therefore, the monostat will be better. You can create an instance, use methods to influence instance data, and still have access to static data. With singleton, you cannot have instance data.
In addition, if you plan to derive classes from singleton, and you want these classes to be single, your best bet is a monostat. This is because all classes derived from a monostat are monostatic. Classes based on singleton classes are not single by default. You will need to add a static method and attribute to each derived class.
Mithun sasidharan
source share