2 Comments
User's avatar
Alejandro Piad Morffis's avatar

Super as usual! I know your intention is not to go deep into the singleton pattern, but just in case someone wants to dig further, Iwanted to point out that one of the many challenges in making singletons work is to make them thread-safe, which is not something you usually worry about when writing constructors and initializers. It's a fun exercise!

Expand full comment
Stephen Gruppetta's avatar

Indeed–I relegated that to just a passing comment, but perhaps another post on another day…

Expand full comment