| Multi-methods are how Lisp based languages have done OO since the early days. LOOPS in Interlisp-D, here for a time travel to Xerox PARC. http://www.softwarepreservation.org/projects/LISP/interlisp_... Check the "LOOPS, A Friendly Prime" book. Meta-methods are at the core of CLOS, Common Lisp Object System, made famous with the "The Art of Metaobject Protocol" book. http://www.amazon.de/The-Metaobject-Protocol-Gregor-Kiczales... They are also used by Dylan, the Lisp with Algol like syntax developed by Apple, Protocols provide the same type of polymorphism offered by Objective-C protocols, Java/C# interfaces, Go interfaces, ... Many mainstream developers might only know one way of doing OO, but back in the day we could choose between Smalltalk, Lisp, Beta, Eiffel, Sather, C++, Modula-3, Oberon, Component Pascal, SELF, ..... Each had their own view how encapsulation, polymorphism, message dispatch, type extensions should take place. So it is kind of funny to have some in FP languages bashing OO, while successful FP languages are actually hybrid. At the same time having people in teh OO side bashing FP, while their languages keep absorbing FP concepts. Eventually we will get back to Smalltalk and Lisp, which already provided both ways in the late 70's. |