Seeing that Uncle Bob is making a new version of Clean Code I decided to try and find this article about the original.

  • Takumidesh@lemmy.world
    link
    fedilink
    arrow-up
    10
    arrow-down
    2
    ·
    3 months ago

    Declarative, functional code is by definition much closer to ai prompts than any imperative code. Businesses are just scared of functional programming because they think that by adopting oop then can make developers interchangeable, the reality is that encapsulation is almost never implemented in a proper way and we should be instead focusing on languages that enforce better systems over slamming oop into everything.

    Hell, almost every modern developer agrees that inheritance is just bad and many frown upon polymorphic code as well.

    So if we can’t properly encapsulate, we don’t want inheritance or polymorphism, we don’t want to modify state, what are we even doing with oop?

    • Kogasa@programming.dev
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      3 months ago

      No, not “almost every modern developer thinks inheritance is just bad.” They recognize that “prefer composition over inheritance” has merit. That doesn’t mean inheritance is itself a bad thing, just a situational one. The .NET and Java ecosystems are built out of largely object-oriented designs.