Historically, there is a much narrower definition of OOP than "objects, with behavior." Typically it means that there is some form of dynamic dispatch or late binding based on runtime type. There are other forms of polymorphism, yes, such as statically dispatching any object satisfying an interface to a given function (i.e. typeclassing), but this doesn't fall under the historical umbrella of OOP, even though it solves roughly the same problem.
Typeclassing separates code from data though. That can be a good thing or a bad thing, but it's quite radically different from the conventional OOP ideal of "put your related code and data together".
7
u/SirClueless Feb 23 '12
Historically, there is a much narrower definition of OOP than "objects, with behavior." Typically it means that there is some form of dynamic dispatch or late binding based on runtime type. There are other forms of polymorphism, yes, such as statically dispatching any object satisfying an interface to a given function (i.e. typeclassing), but this doesn't fall under the historical umbrella of OOP, even though it solves roughly the same problem.