On Thu, Feb 12, 2004 at 11:03:57AM -0800, chromatic wrote: : On a conceptual level, the different syntax is the worst crime because : it reinforces the idea that the important question about an object is : "What is this object's position in a class hierarchy?", not "Does this : object have the same semantic meaning for these operations as I expect : it to have?"
What I'm currently thinking about is a "does" predicate that tells you if an object/class does a particular role completely. If you pull part of a role into a class, it returns false, because it doesn't do the complete role. However, if you use "like" instead, it returns a number between 0 and 1 telling you what fraction of the role's methods it uses. So you can ask if your object is more like a Dog or a Tree. Unless someone comes up with a better idea, of course. Obviously .does() is redundant with .like() == 1. But it seems like a useful redundancy. Larry