On Aug 24, 2008, at 6:51 PM, Mark S. Miller wrote: > On Sun, Aug 24, 2008 at 5:40 PM, Brendan Eich <[EMAIL PROTECTED]> > wrote: >> Why is eq being proposed whatever happens with Decimal? > > Because in the absence of decimal, === is close enough to an > "identical" test that one can practically code around the problem > cases (NaN and -0)
You're assuming 1.0m === 1.00m must be true. I'm disputing that (see exchange with Sam, who may agree). >> 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 ;-). > > Until we add either hashcode or decimal, we can postpone the whole > topic. I'm trying to avoid too much creature feep in any edition ;-). Other languages have near-universally-quantified hashcode analogues but solve NaN dilemmas by throwing (Python, IIRC). We can enlarge the language to be strictly more expressive, or we could enlarge equivalence classes under ===, or we could choose to make certain seemingly equal numbers !==. The rationale for excluding the last two alternatives when mooting Object.eq is not clear. /be _______________________________________________ Es-discuss mailing list Es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss