Common Lisp has inheritance of methods, but it does not work on a class hierarchy directly. When a generic function gets called, the applicable methods are being ordered based on the classes of the arguments - not just one argument, but possibly many. A more specific method can call the next method. In some cases this is done automatically. This is inheritance, based on the class hierarchy.
CLOS also allows the developer to implement other inheritance mechanisms, by developing his own way to combine the methods of a generic function.
Re:JEP 295: Ahead-of-Time Compilation
by belovedeagle on Thursday October 27, 2016 @06:03PM
(#12810701)
Rust fails many of the other tests mentioned. As for polymorphism, is Haskell OO? If so, then I think my claim that the term is meaningless is justified.
This is the punch line. Once you have a definition of OO, which fits all languages usually considered OO, the definition also fits Haskell. :)
CLOS effectively does have inheritance for methods because for sane specializers subclass matches everywhere where it's superclass matches. One can in fact view the CLOS mechanism of specializers and effective-method composition as more flexible mechanism for inheritance than traditional implementations of OOP.
Imho, OO is about polymorphism [0] and Rust provides that.
[0] http://beza1e1.tuxen.de/articles/oop.html