[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lightweight Languages Workshop (DDJ Article)




On Monday, January 28, 2002, at 05:00  PM, Greg C wrote:

> Scott Ribe <scott_ribe@killerbytes.com> wrote in message 
> news:<B879BAA4.65EB%scott_ribe@killerbytes.com>...
>>
>> But Eiffel only does single dispatch [...]
>
> Nonsense. Here's an article describing dynamic dispatch in the GNU 
> Eiffel compiler.
>
> http://smalleiffel.loria.fr/papers/papers.html#OOPSLA97
>
>


You're confusing two different distinctions:

1. Static v. Dynamic dispatch
2. Single v. Multiple dispatch.

Scott Ribe wrote that Eiffel only does Single dispatch. This is true, as 
can be seen by reading the article on the Small Eiffel compiler which 
you provided a link to. The article consistently refers to "the 
selector." A single selector is characteristic of languages that only 
dispatch on the class or type of one argument. In languages where 
methods belong to classes, that one argument is the class that "owns" 
the method.

  Dylan, like CLOS, has multiple dispatch. Methods do not belong to 
classes. Method dispatch takes place on the class of *all* arguments, 
not just one. For a brief description of how this works, and why it is 
different - and better ;^ ) - than single dispatch, see:

<http://www.tpk.net/~ekidd/dylan/multiple-dispatch.html>


For a reference on how Eiffel does _not_ have multiple dispatch, and how 
this can be worked around, see:

<http://www.cs.washington.edu/homes/todd/papers/oopsla98.html>

Which is an abstract for a full paper here:
<http://www.cs.washington.edu/homes/todd/papers/oopsla98.ps>

Raffael Cavallaro, Ph.D.
raffael@mediaone.net