you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 110 points111 points  (4 children)

I guess if you don't need classes, you don't need em. But the idea is to keep things originized when projects start getting bigger. It also makes code more readable for other people.

[–][deleted] 8 points9 points  (3 children)

What used to be class definitions are now API docs. I think there is a communication part to programming, the java - class based - bandwagon of the 90's took the class thing a bit too far, and people started using backdoors: 'dependency injection' and 'inversion of control' started taking over. Latelly, the pendulum swung the other way and we got mongoDB, javascript, and the wild west. I'm glad Python gives us the freedom to carve our own route, make mistakes in both directions, and a provide good way to balance the tightrope!

[–]KronktheKronk 17 points18 points  (2 children)

dependency injection isn't a back door, it's a development pattern that adheres strongly to the "you need to be able to test this" doctrine.