From: Sean O'Dell Date: 2004-06-07T13:23:50+09:00 Subject: Re: How to ducktype a Hash? On Sunday 06 June 2004 20:48, George Ogata wrote: > "Sean O'Dell" writes: > >> Sorry for being slow, but I have no idea what you're after. Could you > >> give an example of what you'd like to be able to write to achieve what > >> you want? > > > > object.implements(:hash_interface) > > Well, as Kristof replied, that's easily done. Doing it on a per-Class > basis is similarly easy. But how is it different to the idea that you > called "a kludge" (http:///www.ruby-talk.org/102539)? Or is your > complaint that it is not already done in the stdlib? My complaint is that it's not already in the stdlib. I don't expect everything I want to come from the standard libraries. Most of the code I call is my own. But when it comes to something like type checking, I really feel the language should offer SOMETHING sufficient to solve a problem like this. Sean O'Dell