Till Schneidereit (2014-05-14T09:37:50.000Z)
domenic at domenicdenicola.com (2014-05-14T17:03:55.681Z)
While I think having .last would be nice, I don't think it's worth the considerable backwards-compatibility issues. We had to temporarily back out Array#values from SpiderMonkey until we implement @@unscopable semantics[1], because we ran into serious real-world breakage. I'm pretty sure that "last" would break a lot more code, as it's even easier to think up scenarios where that'd be used as a property name on an array used in application logic. At the very least, I think having Array#last be a getter is entirely untenable: a method would at least just be overwritten in most cases, whereas a read-only accessor would just (silently, in non-strict code) fail. A read-write accessor would probably be even worse: it'd silently (in all code) do something entirely different than it did before. I do, however, like [Axel's proposal][2] of adding .get() and .set() to Array.prototype, and think that that'd be way less of a compatibility issue. [1]: https://mail.mozilla.org/pipermail/es-discuss/2013-July/thread.html#32185 [2]: http://esdiscuss.org/topic/array-prototype-last#content