Re: Generics vs. Message passing: object namespaces
"Joe Marshall" <[email protected]> Mon, 26 Feb 2007 12:20:45 -0800
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
On 2/25/07, Robbert Haarman <[email protected]> wrote: > > Having said that, I don't think the "object dispatch provides more > namespaces than generic functions" really makes sense. Whether you write > x.foo or (foo x) is just a matter of syntax. In as far as the type of x > helps disambiguate foo in the object dispatch case, it also helps > disambiguate foo in the generic function case. Exactly. What I am trying to get across (without much success) is that with `object dispatch' you look up the type first, then find the method name, whereas in `generic dispatch' you look up the name first and then find the type. In either case the space of possible combinations is identical. -- ~jrm