Re: Generics vs. Message passing: object namespaces

Tom Locke <[email protected]> Fri, 23 Feb 2007 10:04:51 +0000
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
> (In a Scheme-style language, even the generic functions are  
> anonymous and are simply bound to variables, so in such languages  
> this all boils down to having a good modularization mechanism for  
> plain variables.)

The point about message-dispatch OO, is that the type of the receiver  
(or first argument if you prefer) is used to locate the namespace. A  
modularization mechanism for plain variables wouldn't get into what  
the variable happened to be bound to - the call takes place after the  
variable has been looked up, as an entirely separate operation.

You could consider this loss of useful information that has to be  
compensated for with more verbose method names.

Tom