News for hackers. Stuff that matters.
Re:Learning to Program: Why Python? by gbog on Tuesday May 08, 2012 @07:57PM (#3946418)
Liked the fair simplicity of the post but I am disappointed by the Wikipedia links. Like many design pattern they look like Java special idioms used to overcome its limitations. So dependency injection is just "if x import y"? Like any other conditional, it must be used only if necessary but does it need be a Design Pattern?
Re:Learning to Program: Why Python? by evincarofautumn on Tuesday May 08, 2012 @09:43PM (#3946719)
Design patterns tend to arise due to linguistic limitations, but not always. They’re mainly a shared vocabulary for talking about software architecture and design, regardless of paradigm.

As for dependency injection: DI ⊆ inversion of control ⊆ decoupling ⊆ factoring, where ⊆ = “is a kind of”. Roughly, DI means externalising dependencies and giving them as parameters in order to reduce coupling. Which, when you put it that way, is obvious, and something we (should) do often in any language.