From: Dave Thomas Date: 2001-05-09T01:10:00+09:00 Subject: [ruby-talk:14870] Re: Polymorphic methods "Benjamin J. Tilly" writes: > In the paragraph before the snippet you show, I said explicit > or implicit. Hiding the test in a method lookup is what I meant > by implicit. But the lookup is still there. It needs to be > performed by the interpreter, understood by the programmer. > > It does not come totally free. Absolutely. There is always going to be some kind of dispatch overhead with runtime polymorphism. I'm also nervous with the idea of spreading the knowledge of my class into a whole lot of other classes, which the double dispatch requires. Your example of Matju's stuff not working as a dropin is a good one. I'm worried too about the engineering aspects of everyone and their dog dropping methods into base classes. So I'm not sure which method I'd personally recommend: I guess I'm still experimenting. Dave