Re:One Year After Switching from Java to Go: Our Experiences
by arnath on Tuesday February 18, 2025 @07:08PM
(#43096842)
This comment is about a very minor part of what you said, but isn’t the whole point of a DI framework to write code you’d have written anyway to save you time?
[ Parent
| on HN ]
Re:One Year After Switching from Java to Go: Our Experiences
by MrDarcy on Tuesday February 18, 2025 @10:39PM
(#43098306)
I was writing code similar to how the popular int13 kubelogin kubectl plugin works, which also uses wire for DI and is organized as a clean architecture repo. In that particular case I found both the clean architecture and the wire DI to add more layers of abstraction, which took more time to comprehend, write, and maintain than jettisoning both and doing it with idiomatic Go.
Re:One Year After Switching from Java to Go: Our Experiences
by bcrosby95 on Wednesday February 19, 2025 @12:29AM
(#43098889)
DI frameworks save you from writing trivial code, and it masks dependency insanity. This is why I don't use it even in Java. If the codebase gets to the point where a DI framework is really useful then you've fucked yourself over.
Re:One Year After Switching from Java to Go: Our Experiences
by unscaled on Wednesday February 19, 2025 @07:18AM
(#43101250)
To be fair, traditional Java EE apps often required a DI framework, because you couldn't control the main entry point of the program, and the entry point to your code was a class with a default no-argument constructor.
This is still insanity, but the insanity comes from Java EE rather than the apps themselves.