Jul 16, 2024
Article makes a few mistakes but the biggest is conflating Singletons with global shared state. Accessing and using global variables is a different kettle of fish from the Singleton design pattern, which is used to guarantee that one--and only one--instance of a particular service can ever exist.