I think it's to allow for the writing of equations that then are subsequently used in Solve, DSolve, and other such functions. If Equal
were to return False
when both sides do not explicitly evaluate to True
or False
then there'd be no mechanism with which to write systems of equations. For example the following would not be possible as a useful syntax
Solve[a x + b ==c, x]
As a general rule I always use SameQ
if I want to make a determination of truth in an expression. However, you might want to use Equal
to allow for the possibility that an expression actually might not evaluate to either True
or False
and thereby make use of (for example) a third argument in an If
statement.
When I look at other people's code I find they often do not make use of ===
and never notice the potential issue of using ==
until it bites them. An alternative is to make use of ==
along with wrapping the expression in TrueQ
which forces a False
when the expression using ==
does not evaluate to True
or False
. So--rule of thumb--always use ===
over ==
when doing a test of truth unless there's a good reason to make use of ==
.