2 ms·
> I appreciate your response. Unfortunately, I don't feel you have presented a convincing argument against its established classification as an OO design patter
by rumanator 6y ago
> I appreciate your response. Unfortunately, I don't feel you have presented a convincing argument against its established classification as an OO design pattern for the last several decades.
The argument is self-evident. A singleton does not use or need any OO construct to be implemented or used.
There is nothing special or specific to OO to exclusively own the concept of ensuring a single globally-accessible system-wide data structure.
As I've said, singletons are implemented with static functions returning static variables. No OO involved at all.
Your only argument tying singletons to OO is the fact they are covered in GoF. However, that argument has no merit not makes any sense. GoF does not specify what is and is not OO. It only shows basic design patterns and presents ways of implementing them with OO languages. Otherwise you would also claim that instantiating variables is OO just because GoF describes factory methods.