On Saturday 05 June 2004 10:39, Dave Thomas wrote: > On Jun 5, 2004, at 12:30, Sean O'Dell wrote: > > I just don't like this duck-typing business. I can handle dynamic > > typing, but > > I wish there were something more solid about the typing, at least a > > way to > > know when an object implements a certain interface or not, so I can > > tell an > > array-like object from a hash-like object. > > Perhaps you could design the interface to your classes so that the > distinction is either explicit or irrelevant. It's not my classes that are the problem, it's all of the other objects that respond to [] and []=, but which aren't hash-like (they're array-like, and even then it's anyone's guess as to the functionality). Sean O'Dell