Re: Generics vs. Message passing: object namespaces
[email protected] Fri, 23 Feb 2007 23:34:59 -0500 (EST)
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
> 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. You may be right for the
problem you are focusing on but it has nothing to do with the
discussion at hand. The question is about namespace collisions. 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.