3 ms·
polymorphism is not an OOP concept. https://en.wikipedia.org/wiki/Polymorphism_(computer_science) https://en.wikipedia.org/wiki/Polymorphism_(computer_science.
by fckgnad 4y ago
polymorphism is not an OOP concept.
https://en.wikipedia.org/wiki/Polymorphism_(computer_science) https://en.wikipedia.org/wiki/Polymorphism_(computer_science...
You will see Wikipedia doesn't treat it as such. Examples are shown in functional languages and it is not hierarchically categorized as a exclusively a part of OOP.
- pjmlp 4y agoFrom that link, "In a 1985 paper, Peter Wegner and Luca Cardelli introduced the term inclusion polymorphism to model subtypes and inheritance,[2] citing Simula as the first programming language to implement it" Polymorphism is part of what makes a language OOP capable, naturally it also exists in other paradigms. We can also do other examples like discussing the semantics of closure and methods equivalency. https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent Do you also want Simon Peyton Jones point of view on Haskell type classes and OOP relate to each other? "Classes, Jim, but not as we know them" https://www.microsoft.com/en-us/research/publication/classes-jim-not-know-2009/ https://www.microsoft.com/en-us/research/publication/classes...
- fckgnad 4y agoWe can keep the discussion going but I don't see why? Polymorphism is not part of OOP it's much more universal then that. It can be used by OOP the same way numbers can be used as in OOP programming. But numbers are not hierarchically under the umbrella of OOP. I mean what is the point you're trying to make here? That polymorphism is fundamentally and categorically OOP? Are you saying that anything that uses polymorphism (which is almost every language under the sun) is OOP? >Do you also want Simon Peyton Jones point of view on Haskell type classes and OOP relate to each other? No? Wouldn't that be a completely different topic?
- pjmlp 4y agoAll worthy candidates to successor languages to C++ also support OOP in some form, that is the point. Not the OOP from all I know is Java, rather the OOP from SIGPLAN, ECOOP, IEEE, ACM papers, which happen to have polymorphism as one of the common features across all variations of what can be considered as an OOP capable language.
- fckgnad 4y ago[dead]