Object.eq is ready for discussion

Asen Bozhilov asen.bozhilov at gmail.com
Tue Sep 7 03:58:36 PDT 2010

Mark S. Miller:
> http://wiki.ecmascript.org/doku.php?id=strawman:egal
> [...]
> Opinions?

How about:

Object.compare(x, y);

I think this is enough meaningful and solve the problem with third
party naming collisions. I would like to see `compare' method with
more than two arguments. For example If I want to compare three
objects for equalities, I should be write:

Object.identity(x, y) && Object.identity(y, z)

Isn't good idea for comparing N arguments for equality? The code above
would be rewritten as:

Object.identity(x, y, z)

I really miss the point, why the language API should be care about
naming collisions with third party libraries? If tomorrow someone in
JQuery or Prototype team makes a decision for augmentation of `Object'
constructor, is it really matter for the designers of the language

Thanks in advance for your valuable answers.

More information about the es-discuss mailing list