It’s getting more and more unhinged on LinkedIn.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      At its core, OOP is just commingling data and operations, whereas FP is separating data from operations on data. I’m not an expert at Haskell (I cut my FP teeth on Lisp), but that’s essentially what typeclasses look like to me.

      The Rust book has a section on OOP, and the main thing to remember is that Rust solves OOP through composition instead of inheritance. Rust doesn’t have inheritance in any meaningful way, but it can solve problems in a similar way as classical OOP.