On Wed, Mar 2, 2011 at 4:07 PM, Marvin Humphrey <[email protected]> wrote: > For some classes, e.g. CharBuf, Equals() should emphatically *not* test for > class membership, so that e.g. a CharBuf and a ViewCharBuf with the same > logical content test as equal. For FieldType, I can't think of a scenario > where having objects which belong to different classes test as equal would be > desirable.
All sounds reasonable and like good changes. My only thought would be that it might be better not to mentally overload the name Equals. Maybe FType_SameClass() would be clearer? At heart, I'm really not in favor of overloading anything, so I'd even be happy to rename both of them if it would improve clarity. Should a CharBuf and a ViewCharBuf have the SameContent()? While I'm nitpicking, is the '!!' really necessary there? I'm not sure how these fields are being used, but is it certain that one always wants to consider things the same if these have different values? --nate
