The second implementation has the notable constraint that ==
will always be the boolean opposite of !=
. This is probably what you want, and it makes your code easier to maintain because you only have to change one implementation to keep the two in sync.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…