• jvisick@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    “Dependency injection” is just a term for providing a function or method with its dependencies rather than making the function go and gather them itself.

    It’s (typically) done through parameters, but it’s still more specific than just invoking a function. It describes how that function was written and the reasoning for certain parameters. To the other commenter’s point, you’ll have a hard time communicating about your code with other developers if you refuse to use the term dependency injection just because you don’t like OOP.