Es-discuss - several decimal discussions
brendan at mozilla.org
Sun Aug 24 17:40:57 PDT 2008
On Aug 24, 2008, at 11:43 AM, Mark S. Miller wrote:
>> I agree with you, compareTotal or something like it (stringization
>> followed by ===) is enough.
> compareTotal is addressing a completely different need than Object.eq.
Why is eq being proposed whatever happens with Decimal?
BTW, eq is traditional in Lisps but way too short and overloaded in
JS. Suggest Object.identical or something like that. If the topic is
Object.hashcode, then this makes sense. I don't see why Decimal
caused eq to be brought up, though.
> With decimal postponed, we don't need to settle this now. But
> <http://en.wikipedia.org/wiki/Equivalence_relation> explains,
We've been over this before, === is an equivalence relation excluding
NaN. It happens to put 0 and -0 in the same equivalence class. Why
this is a problem has yet to be demonstrated (add hashcode and then
we can talk ;-).
More information about the Es-discuss