[squeak-dev] a==b "true" but a=b "false"

Chris Muller ma.chris.m at gmail.com
Wed Sep 3 23:11:53 UTC 2014


When could it happen?

A:  With Float nan.

   Float nan == Float nan   "true"

   Float nan = Float nan   "false"

It violates what I have long considered an invariant that if a==b, then a=b.

Real world context:  When two DB clients change the same object in the
exact same way, it's not a conflict.  If they change it differently,
it is.

They've both made the same reference to Float nan, but just asking if
they made equivalent changes still reports false.  So I have to put in
a complicated special check for NaN first..??

Okay, I actually wrote:  (a==b or: [a=b]) but who would ever write
that or not "simplify it" in teh future if they saw it?

Comments?  Why shouldn't Float nan = Float nan?


More information about the Squeak-dev mailing list