News for hackers. Stuff that matters.
Re:Inversion of Control Containers and the Dependency Inject... by Veserv on Thursday February 22, 2024 @01:25AM (#39463838)
1. No. To quote the very same Guice documents you are pointing at: "What is dependency injection? Dependency injection is a design pattern wherein classes declare their dependencies as arguments instead of creating those dependencies directly." Literally what I said.

2. Oh boy, this is the first time I have seen Guice and it is exactly what I am talking about with languages not understanding the concept and having to be worked around with utter hacks. If you just had symbols you could bind constructors/types to and then pass those around into your implementations you could get rid of most of the common cases they mention in their docs.

There are no comments on this comment yet.