From: Ryan Leavengood Date: 2001-11-03T04:09:47+09:00 Subject: [ruby-talk:24191] Re: Limits of dynamism? > My point was to ask the community and matz why this isn't the default > behavior. Right. Well my point was that despite your delegation technique, the variable t is still a T and not an Array, as far as the core API is concerned. The real issue is probably that core behavior does not totally rely on Ruby level message sends but on the C API (for example instead of asking the object what it's class is, Ruby figures it out since it knows the internal structure of objects.) In the case you mentioned I think the core API was correct because the variable t was not *really* an Array, it just acted like one. But by modifying Module#=== to do double dispatch (sort of) and ask the other object if it is the kind of class asking it, we get the desired behavior. I think that a good part of the reason why things aren't already done this way is performance. Calling C functions is faster than calling Ruby methods (at the moment.) But relying on pure message sends would offer some certain flexibility and greater dynamism, as you point out. It is an interesting point and one that requires some thought as we plan for Ruby 2.0. Ryan Leavengood