4 ms·
I probably over-stated that a bit. I don't think there's a hard stance against it. I do think it's rarely a good way to structure your program, because it make
by t8sr 3y ago
I probably over-stated that a bit. I don't think there's a hard stance against it.
I do think it's rarely a good way to structure your program, because it makes it harder to know what's happening, and the goal should be to make it easier to see what's happening, both for the programmer and the poor devops guy who has to debug it when it goes down in production and people are yelling.
Of course the real world is complicated, and DI isn't always avoidable. You are right that Go's accept-side interfaces are neutral w.r. to DI.