From: "David A. Black" Date: 2004-06-07T21:37:36+09:00 Subject: Re: How to ducktype a Hash? Hi -- On Mon, 7 Jun 2004, Sean O'Dell wrote: > 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. Matz is definitely giving thought to this area; see . This is one area where, I have to admit, I'm glad Matz moves very cautiously :-) David -- David A. Black dblack@wobblini.net