Es-discuss - several decimal discussions

Brendan Eich brendan at
Mon Aug 25 14:06:30 PDT 2008

On Aug 25, 2008, at 1:59 PM, Mark S. Miller wrote:

> On Mon, Aug 25, 2008 at 1:20 PM, Brendan Eich <brendan at>  
> wrote:
>> On Aug 25, 2008, at 6:45 AM, Mark S. Miller wrote:
>>> What is it you and Sam are agreeing about? I lost track.
>> That if we make cohort members == and ===, telling anyone who  
>> still wants to
>> distinguish 1.0m from 1.00m to use compareTotal is "good enough".
> I agree with this if-then, but why not recommend Object.identical  
> instead?

Cuz it's more work for 3.1 than needed, and compareTotal is required  
by P754 IIRC. Either's good, Object.identical is better, but when in  
doubt... Yeah, I'm still thinking in Decimal for ES3.1 terms here.

> In any case, is there any general agreement about *whether* 1.0m ==
> 1.00m or 1.0m === 1.00m? This is where I lost track.

Yes, I believe Sam and I agree on those holding true. As you note,  
typeof x == typeof y && x == y => x === y, so anything else will  
break that relation, and it's not just an ideal form: users,  
especially those taught to avoid == in favor of ===, will have our  
heads if 1.0m != 1.00m.


More information about the Es-discuss mailing list