Alex Vincent wrote:
var x = new SmallDecimal(2);
var y = new SmallDecimal(3);
[x < y, x > y, x == y, x <= y, x >= y, x != y]

valueOf doesn't work for SmallDecimal(2) == SmallDecimal(2), though. You have to hash-cons, which kils performance.

String relational order is wrong for numeric types, to boot:

js> '10' < '2'
true

So valueOf is a no-go.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to