Re: Generics vs. Message passing: object namespaces

Tom Locke <[email protected]> Fri, 23 Feb 2007 18:11:54 +0000
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
> But it seems that it should be trivial to have, in a CLOS-style  
> generic function system, 'draw' bound to a function that would look  
> at the type of its first argument and dispatch to the appropriate  
> GF. Then you'd have:
>
> (draw gun args)

This is exactly what I've been wondering about. It's essentially a  
hybrid of object-dispatch and GF. I have a feeling though, that the  
CLOS proponents will object to the special status afforded to the  
first arg.

Anyone see any problems with this?

T.

p.s. I think Mike hit the nail on the head - it's about pragmatism  
not absolutes. As you said yourself recently Pascal, language design  
is all about convenience, and shorter, more readable names are more  
convenient, even if there are occasions when you have to fall back to  
a more verbose style.