From: Robert Klemme Date: 2010-07-22T03:00:03+09:00 Subject: Re: ruby abstraction On 22.07.2010 01:11, Clifford Heath wrote: > Robert Klemme wrote: >> 2010/7/19 Clifford Heath : >> >>> 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. Wouldn't that mean duplicate entries for a method which is part of several interfaces? And what happens in case of interface inheritance? > Of course, there are many ways to optimise it, as Rick pointed out. > Excellent paper, Rick, I enjoyed it. Same here. :-) Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/