News for hackers. Stuff that matters.
Re:You probably don't need a dependency injection framework by almostdeadguy on Monday May 26, 2025 @09:05AM (#44097088)
I meant "singleton" in the sense of a single value for a type shared by anything that requires one, i.e. a Guice singleton ( https://github.com/google/guice/wiki/scopes#singleton ) not a value in global scope. Or maybe a single value by type with an annotation, the salient point is that there are values in a program that must be shared for correctness. Parameterless constructors prohibit you from using these (unless you have global variables).

There are no comments on this comment yet.