• sidelove@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    19 hours ago

    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.