Domenic Denicola wrote:
From: es-discuss [mailto:[email protected]] On Behalf Of Brendan 
Eich

>  js>  0L == "0"
>  typein:2:0 TypeError: no operator function found for ==

Hmm, upon seeing this in action, I'm not sure how I feel about `==` throwing.

Oh for crying out loud!

half a :-)

You can't please anyone around here...

  It doesn't normally do that (modulo bad custom `valueOf`/`toString` methods), 
so I think there will be a lot of code that assumes when it `==`s two values it 
doesn't need to wrap that expression in `try`/`catch`.

`do { try { x == y } catch { false } }`, the new `x == y`?

So what? Exceptions for the insane (intransitive, lossy) == cases are *better* than toString/valueOf.

JS is damned if it does, and damned if it doesn't.

Anyway, value objects are not dispatching to toString or valueOf when used with arithmetic operators. That's the design. Given == and <=, the rest follows.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to