4 ms·
An internet discovers dependency injection. Hackernews responds, "Well of course we knew THAT." The Rust Evangelism Strikeforce is off on a secret mission in th
by bitwize 9y ago
An internet discovers dependency injection. Hackernews responds, "Well of course we knew THAT." The Rust Evangelism Strikeforce is off on a secret mission in the Balkans.
- hota_mazi 9y agoThat's not dependency injection, it's dependency passing.
- dbenhur 9y agoIt's the method of DI known as Constructor Injection. https://en.wikipedia.org/wiki/Dependency_injection#Constructor_injection https://en.wikipedia.org/wiki/Dependency_injection#Construct...
- MrBuddyCasino 9y ago"DI isn't idiomatic in Go" is what I've heard quite a few times. Java did it so it must be wrong.
- bitwize 9y agoWhich pretty much confirms that Go is engineered to do things the stupid way around, and that developers inculcated in its idioms are just now beginning to see the benefits of what boring old Java programmers have been doing for a decade or more.
- weberc2 9y agoI've only heard this in reference to DI frameworks. DI is very idiomatic.