Hacker News new | ask | show | jobs
by AtomicPlayboy 1929 days ago
I would partially agree, although I don't know many implementations.

It's a state that cannot be naturally duplicated, alright, a "single source of truth". But lazy instantiation is nothing more than a very important and very common second. The pattern itself lies in preventing public-level instantiation (i.e. in Java it could translate to a class with a private constructor, private instantiation and access to the instance through a class-level/static getter, and also making it a final class).