3 ms·
For which any simple configuration mechanism will do, and as long as you stick with coding to the interface, the problem is solved. So while technically this is
by wyuenho 14y ago
For which any simple configuration mechanism will do, and as long as you stick with coding to the interface, the problem is solved. So while technically this is called DI in Java, it's simply code taken as granted in many dynamic languages because of duck-typing. So yes, this is totally valid use case, but one with no need for a DI container in dynamic languages to solve.
- thelawal 14y agoFirst a DI container is not a necessary to do DI in any of the discussed languages. This is shown by the fact that you describe using duck-typing as method of doing DI in Ruby.