bort@sopuli.xyz to Programmer Humor@programming.dev · 7 months agoSTOP DOING DEPENDENCY INJECTIONsopuli.xyzimagemessage-square77fedilinkarrow-up1420arrow-down129
arrow-up1391arrow-down1imageSTOP DOING DEPENDENCY INJECTIONsopuli.xyzbort@sopuli.xyz to Programmer Humor@programming.dev · 7 months agomessage-square77fedilink
minus-squarecadekat@pawb.sociallinkfedilinkarrow-up1·7 months agoI’m using value in the loosest sense, like how all objects are values. So now if you have three implementations of IProductService, how do you know which one is configured?
minus-squareZagorath@aussie.zonelinkfedilinkEnglisharrow-up1·7 months agoIt’s easy to imagine a hypothetical way that could lead to problems. But in all the code I’ve worked with, either that scenario is avoided entirely, or other context makes it absolutely clear which IProductService is being used.
I’m using value in the loosest sense, like how all objects are values.
So now if you have three implementations of
IProductService
, how do you know which one is configured?It’s easy to imagine a hypothetical way that could lead to problems. But in all the code I’ve worked with, either that scenario is avoided entirely, or other context makes it absolutely clear which
IProductService
is being used.