Re: Generics vs. Message passing: object namespaces

[email protected] Fri, 23 Feb 2007 21:56:13 -0500 (EST)
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
> Here is the problem. Consider two interfaces in Java:
>
> ...
>
> This doesn't compile. There is no way in Java to define a class that
> can implement both I1 and I2. If I1 and I2 are from different vendors
> and you need to implement both interfaces, you're screwed.

    Here is the problem: this example uses name collision as a result of
multiple inheritance, and the complaint at hand wrt CLOS is a problem
that arises even when multiple inheritance is not involved.  Clearly,
the latter situation is more serious -- i.e., more likely to be more
common -- hence my claim that the problem arises sooner with generic
dispatch.  That an example can be found that shows a problem is not
compelling, it is a question of comparing the problems in the two
systems.  In this case its a bit apples and oranges I think.  As an
aside, this is not a problem endemic to object dispatch, but Java's
implementation.  In C++ and presumably other languages one could
explicitly resolve the conflict within the class definition.


> DING!  I declare this round goes to object dispatch.
>
> This is juvenile. I don't want to win a fight, and I couldn't care
> less whether you are going to use generic functions or not.

    No, it's called 'humor'.  Via wordplay I was making the serious point
that I see a clear difference between the two systems in this area and
one seems to 'win' over the other, as in the hacker meanings of
'winnage' and 'lossage', etc.  It had nothing to do with a conflict
between humans or an attempt to bruise an ego.  Such is e-mail.