Tag: Singleton
3 posts
-
Design Patterns in Modern C++: What Singleton, Factory, Observer, Strategy and Visitor Look Like After C++17
How GoF patterns change in modern C++: Meyers singleton and its test traps, factory registries, observer re-entrancy, visitor as std::variant, CRTP.
-
JavaScript Design Patterns: Singleton, Factory, Module, Observer, Proxy and Strategy
Singleton, Factory, Module, Observer, Proxy and Strategy patterns in JavaScript, with ES6 code, an event system, a caching proxy and a small state store.
-
C++ Static Initialization Order
Why globals in different C++ translation units initialize in an unspecified order, and how function-local statics, constinit, inline constexpr, explicit init functions and std::optional fix it.