From: Sean O'Dell Date: 2004-06-07T02:21:44+09:00 Subject: Re: How to ducktype a Hash? On Sunday 06 June 2004 02:52, Jeff Mitchell wrote: > --- gabriele renzi wrote: > > > > I believe Sean is correct in saying that what he defines as hash-like > > behaviour is usage of [] with arbitrary objects. S > > uggesting fetch and store is ok, but for many things it does not work > > (say, pstore does not seem to have #store and #lookup, yet it has > > hash-like behaviour via []) > > This is the fault of PStore or of the lack of agreed-upon semantics > for classes with hash-like behavior. There should be a standard list > which includes the definition of such behavior. Here, I'll start the > list now: I don't think such casual contracts as saying "this method identifies an entire interface" is sufficient. That's why we have objects that implement hash-like behavior, but which are impossible to tie together into a "hash-like type." What we need is some positive identification. Sean O'Dell