From: Gavin Sinclair Date: 2004-06-08T00:51:10+09:00 Subject: Re: How to ducktype a Hash? On Tuesday, June 8, 2004, 1:39:10 AM, Robert wrote: > "Gavin Sinclair" schrieb im Newsbeitrag > news:1482033218333.20040608004534@soyabean.com.au... >> On Monday, June 7, 2004, 11:27:41 PM, David wrote: >> >> > I think what we may be running into is the possibility that >> > "ducktyping a Hash" is in a sense a contradiction in terms. >> >> Let me just say that Sean, despite his protestations, doesn't really >> want to check that something is "hash-like". He wants to check that >> something is "map-like". Forget fetch, store, [], etc. A map has two >> essential properties: "keys" and "values". OK, we can all go home now >> :) > Well, you can even view an Array as map like: keys are integers and values > whatever you like. Yeah, but that's a crappy kind of map :) That's more like an array :\ Gavin