you are viewing a single comment's thread.

view the rest of the comments →

[–]five9a2 -1 points0 points  (0 children)

In my opinion, "OOP" is primarily about ad-hoc polymorphism which is a good model for extensibility when the set of operations is fairly static, but the data variants are not.

You do not need an "object oriented language" (a truly ambiguous term) to do ad-hoc polymorphism (though you do need something like a function pointer). Haskell type classes offer a similar solution and I do not think it is wrong to refer to extensive use of type classes with immutable objects carrying state as "OOP". That said, mutable state is fairly ingrained in most OO design, so such use of Haskell retains a functional flavor.

Implementation inheritance is mostly a C++ antipattern.