• fuck_u_spez@lemmy.fmhy.mlOP
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    It’s probably a general symptom of what people call OOP nowadays, in a more functional composeable world (where I’m living in currently). You just use function parameters and interfaces (or as Rust calls it “Traits”). But I still think in OOP, this is enough as well and the dataflow is more clear.

    • offbyone
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Err, wrapping things in interfaces and passing them in as function arguments is dependency injection. You’re probably thinking of the whole “service locator” thing which automatically creates the dependences for you. Usage of that is much more questionable :P