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!
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!
Indeed–I relegated that to just a passing comment, but perhaps another post on another day…