The only thing that’s not obvious to me is that ??= doesn’t seem to invoke new Singleton() if it’s already defined, essentially short-circuiting. Otherwise I would have to look up the semantics of it if I were worried about that constructor having side effects or doing something heavy.
The only thing that’s not obvious to me is that
??=doesn’t seem to invokenew Singleton()if it’s already defined, essentially short-circuiting. Otherwise I would have to look up the semantics of it if I were worried about that constructor having side effects or doing something heavy.