2 ms·
To be clear, most (all?) DI frameworks are available with plain classes without annotations. They do use reflection to figure out which parameter goes where, bu
by faangsticle 3y ago
To be clear, most (all?) DI frameworks are available with plain classes without annotations. They do use reflection to figure out which parameter goes where, but that's it.
public class Foo {
public Foo(Bar bar, Baz baz) {}
}
Is a perfectly valid class as far as most DI frameworks are concerned.
- jwfy2342___ 3y agoI don't find value in runtime DI frameworks, however I'm assuming there is a valid use case for them since they exist.
- faangsticle 3y agoInteroperability with libraries that can be loaded at runtime, and in general skipping a build step that would make development annoying to do.