There are no advantages, except that you do not accept any references to yourself. And โyouโ I do not mean your implementation of MyUtility , I mean those classes that are called MyUtility - in other words, you end up investing knowledge about the implementation of MyUtility in other classes, in contrast to the usual object-oriented principles.
However, the same argument works differently. If you assume that an instance requires an instance, then MyUtility should act as an instance. If you call class methods, then it can pass them to one instance of Singleton.
However, since instances are the norm, and not the exception, stylistically less than imagined, to expect to speak with the instance.
Tommy source share