This question is not about the differences between ==
and Equals
. It's about why they were designed different.
We know the differences causes many problems, which must have been pretty easy to spot up front:
Equals
and==
yield different results for two instances of the same entity.==
yield different results when comparing subclasses, because==
is not polymorphic