3 ms·
> So long as you're calling procedures that are determined by the "type" of the object, whether dynamic or statically dispatched, it's OOP. That's just polymor
by bccdee 11mo ago
> So long as you're calling procedures that are determined by the "type" of the object, whether dynamic or statically dispatched, it's OOP.
That's just polymorphism. Are Haskell typeclass manipulations OOP too? If I fmap a function f across a functor, am I "passing" an fmap "message" with payload f to a dynamic functor object? That feels like a real stretch.
And message-passing isn't inherently polymorphic. If I call `Foo.bar(1, 2)`, I'm only dispatching by type if Foo is cast as a parent class or an interface object, which is typically not the case even in strongly OO code bases. That doesn't mean I'm not passing a message.
Any type of procedure-calling can be framed as "message passing," but that doesn't make all programming OOP.