• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    20 hours ago

    I wouldn’t recommend the Gang of Four book. Many of the design patterns they espouse are way over complicated from the days of peak OOP. You know, FactoryFactoryVisitor stuff. Usually best avoided.

    • FishFace@piefed.social
      link
      fedilink
      English
      arrow-up
      4
      ·
      19 hours ago

      Agreed. And a lot of it is working around limitations of whatever version of Java was common at the time.

      “Visitor pattern” is better implemented as an implementation of Iterator or whatever your language calls that. Everyone knows what “for x in thing” means, but wtf does it mean to “visit” something?