cm0002@suppo.fi to Programmer Humor@programming.dev · 1 day agoSenior devs...suppo.fiimagemessage-square77fedilinkarrow-up1708
arrow-up1708imageSenior devs...suppo.ficm0002@suppo.fi to Programmer Humor@programming.dev · 1 day agomessage-square77fedilink
minus-squareaaaaaaaaargh@feddit.orglinkfedilinkarrow-up1·2 hours agoI think you’re confusing composition with aggregation. DI can’t be composition because the injected object is shared/borrowed, strong composition on the other hand requires the object to be owned. A composed child does not exist without its parent.
I think you’re confusing composition with aggregation. DI can’t be composition because the injected object is shared/borrowed, strong composition on the other hand requires the object to be owned. A composed child does not exist without its parent.