Been reading these posts for a while now. Very interesting stuff here! Sad to
say that Microsoft still has some horrible bugs in it's current JScript
engine, with buggy support of ECMA-262.
For collections, it would be very useful to have a natively-supported
equals() method.
The method would return true when two variables point to the same object.
Basically, the equivalent of:
Object.prototype.equals = function( other ) {
return this === other;
};
This way, collections could override it. If you think about it, we already
have valueOf method that can compare objects using <= and >= or the -
operator.
function compare( objectA, objectB ) {
return objectA.valueOf() - objectB.valueOf();
};
It would also be very useful to have native collections. Object and Array
are limited.
--
View this message in context:
http://www.nabble.com/Object.prototype.equals-tf4077453.html#a11589328
Sent from the Mozilla - ECMAScript 4 discussion mailing list archive at
Nabble.com.
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss