• henfredemars@infosec.pub
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    4 hours ago

    I’ve seen some surprisingly fragile OOP solutions that require tons of internal knowledge about how the classes work. It seems to be a popular approach to writing code that just isn’t very flexible.

    • nous
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      3 hours ago

      It requires you model your problem perfectly from the start, then it can work alright. But in reality you cannot know the future and when new requirements come in that don’t fit the model you created you are left in a crappy spot of needing to refactor everything or just cram it in however you can.

      • henfredemars@infosec.pub
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        33 minutes ago

        I recently did some refactoring with injector and composition patterns already there and it was a breeze.

        OOP isn’t bad but like anything it requires some care.