• @[email protected]
    link
    fedilink
    6
    edit-2
    2 years ago

    I think it’s mainly because object oriented is easier to learn. For the same reason weakly typed and dynamicly typed languages are so common cough JavaScript cough despite not being as good as strongly typed and statically typed. Like, we’ve had more than enough time for the paradigm to shift, and many paradigms in computing have shifted, so to say it’s merely inertia or luck in the early days is incomplete.

    • ☆ Yσɠƚԋσʂ ☆
      link
      fedilink
      42 years ago

      In my experience it’s not really about OO being easier to learn, in fact I’d argue it’s much harder to use correctly. It’s really just the fact that people are more likely to learn it first and then once they learn it they stick with it.

      What makes learning FP difficult if you’ve already internalized imperative style is that patterns aren’t easily transferable from one to the other. And people confuse having to learn new patterns for writing code from ground up with FP being more difficult.

      My anecdotal experience with this is teaching Clojure to coop students my team hired in the past. We found that students from first and second years could pick up Clojure easily while students third and fourth years often found it more challenging. Main factor was that students earlier in their studies didn’t have a lot of preconceptions about how code should be written where students from later years had to unlearn things.

      I find ego plays a role here as well. People who see themselves as being experienced don’t like feeling like beginners, and that’s what it feels like when you’re learning something different from what you’re used to.

      I’m less convinced regarding static typing though. I find the key feature that makes code maintainable is immutability because it allows doing local reasoning about the code. Any large program can, and in my opinion, should be broken down into small independent components. I don’t find dynamic typing to be much of an issue with this approach and it’s always possible to add things like specs and schemas at component boundaries for ensuring correctness.

      The main downside that I’ve found with static typing is that it limits you to a set of statements that can be expressed using a particular type system. And you either have a restrictive language with a simple type system or a flexible one with a complex type system that introduces its own mental overhead.

    • @[email protected]
      link
      fedilink
      32 years ago

      OOP as is popular known is basically “fancier” imperative programming; Turing > Von Neumann > Imperative > OOP

      Lisp is basically were we got dynamic type, and Lisp is the earliest influential example of functional programming.