It would be easier just to replace this whole function with "return compare(other) == VALUE_COMPARE_EQUAL;"