on implementing a toy oop-system

Meredith Montgomery mmontgomery at levado.to
Thu Sep 29 14:00:00 EDT 2022


ram at zedat.fu-berlin.de (Stefan Ram) writes:

[...]

>>>However, to evaluate a method call such as "o.m( a, a1, ... )",
>>>currying does not necessarily have to be used. One can as well 
>>>determine the function to be used for "m" from the type of "o" 
>>>and then call that function with arguments "o", "a", "a1", ... 
>>Was that your last approach? 
>
>   Yes, I think so. 
>
>   (There are also languages with "multi-methods", where upon
>   a function call "m( o, o1, ... )" the decision which function
>   to call depends on all the types of all the arguments.)

I think Clojure is one such.  I've read Part 1 of ``Clojure in Action''
by Amit Rathore, 2012, Manning, ISBN 9781935182597.  I liked it.


More information about the Python-list mailing list