Robert Klemme wrote:
> 2010/7/19 Clifford Heath <no / spam.please.net>:
> 
>> Interfaces provide Java with dynamic method dispatch, without the
>> cost(*) of having every individual method in the dispatch table as
>> is the case with Ruby and other dynamic languages.
> 
> That sounds interesting.  Can you please elaborate a bit more

Because every object which implements an expected interface may have
a different set of other interfaces, it requires a dynamic lookup
to find the right one. Typically there are many fewer interfaces
than methods of course, so the search is cheaper that way.

Of course, there are many ways to optimise it, as Rick pointed out.
Excellent paper, Rick, I enjoyed it.

Clifford Heath.