Re: Generics vs. Message passing: object namespaces

"Joe Marshall" <[email protected]> Fri, 23 Feb 2007 20:56:11 -0800
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
On 2/23/07, [email protected] <[email protected]> wrote:
> > Again I ask, is it an observable property?  Is there code I can write that
> > gives me different results depending on whether I look up the method
> > by using the object first or the method name first?
>
>    I think we are talking past each other.

We may be.

> The question is about namespace collisions.

What is the effect of this `collision'?  Suppose I have two unrelated types
T1 and T2 and instances I1 and I2 of the respective types.  Now suppose
a method named foo is define on each type.  In neither CLOS nor in Java
is there a problem.


>  In
> generic dispatch two methods named 'foo' on two different objects
> share a namespace (modulo package), in object dispatch they do not
> (modulo inheritance).  You can demonstrate this easily and trivially
> in real code.  It is an observable property in languages with the two
> different kinds of dispatch.

Well I wish you would supply some example code that demonstrates
the difference.

-- 
~jrm