Comment

Comment by lars

You can redefine any class in Ruby, so you never need to do dependency injection. If you want to test class A independent of class B, you redefine class B in your test. In that sense , dependency injection is a feature built in to Ruby, which is why no Ruby programmer talks about it.

It's been said that every programming pattern is a programming language design flaw. This is evidence in favor of that.

parent lars 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton