Video details

Retiring the Singleton Pattern: Concrete Suggestions for What to use Instead - Peter Muldoon

English --- “The worst part of this whole topic is that the people who hate singletons rarely give concrete suggestions for what to use instead.” - stackoverflow
In this talk, we will explore just such an approach that will transform currently untestable code containing underlying singletons with a fully testable solution. These code changes are transparent to the original callers of that function so no calling code changes are required.
This approach will be further expanded to handle multiple interdependent singletons. The replacement of error prone specific order of initialization calls to the singletons will be exchanged for "hard to misuse" automatic initialization using features of the language.
A host of other potential real world problems with replacing singletons are shown with solutions presented for both legacy and modern C++.
This alternative approach has been successfully employed in multiple areas in Bloomberg where developers believed there was no other feasible choice.
--- Peter Muldoon Bloomberg Senior developer NYC
--- Streamed & Edited by Digital Medium Ltd - [email protected]