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

Andres Valloud avalloud at smalltalk.comcastbiz.net
Thu Sep 4 19:39:25 UTC 2014


>> 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.
>
> Yep. We might want to fix that.

I'm curious now.  Where did that long considered invariant come from?  I 
also know of a real application that defined, quite on purpose,

SomeDomainObject>>= anObject

	^false


Andres.


More information about the Squeak-dev mailing list