On Thu, Feb 12, 2004 at 12:02:50PM -0800, chromatic wrote: : Is it more useful to find the Dog-like-ness of a class or the notion : that SomeClass.bark() is semantically Dog-like, not Tree-like?
I expect we'd use .can() for method-based queries. : I expect to care more that the object does something Dog-like with the : methods I'm about to call on it than how Dog-like it is in general. : Maybe that's slicing does() way too thin, but like() seems to care an : awful lot about the implementation of how some class does some role. I only see like() as counting the methods available through the public contract to determine its percentage. Something you could do by hand with .can(). But there wouldn't be much point in putting it in if people won't use it. On the other hand, if people want it and it's not there, they'll reinvent it, poorly. Larry