• aaaaaaaaargh@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    2 hours ago

    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.