I'm trying to get my head around the difference between message passing (with which we are all familiar as by far the most common form of object orientation today) vs generic functions as implemented in CLOS (Common Lisp Object System).
In what sense is it possible to say java has a kind of multiple-dispatch system due to method overloading?
To sketch my understanding, in message passing you might do:
tell obja move objb tell objb move obja
but where the function is first class and not in any object, you might do:
move obja objb
The part I do think I understand is that with generics there is no dilemma on where to place a function, whereas in message passing you may have to arbitrarily choose which class to put a function on, then just remember which one you put it on. With message passing, if you want to be able to call the behaviour from either, you have to duplicate the code (yes I know there are ways round that, but that's not the point).
I'm not sure I'm really getting the rest of how generics are different yet.
I just found a key reference on this point.
The wiki page on CLOS is also very good.
So, maybe best method is to hold off with the theory and just practice with clojure multi-methods at some point... unless anyone wishes to chip in.