Over the last year, we have discussed and reached informal agreement to fix what seem like bugs in Editions 1-3 of ECMA-262.
arguments should be an object that delegates to Array.prototype. See http://bugs.ecmascript-lang.org/ticket/27 for specific information.eval should be a unary operator, like delete. See with-bound variables for discussion.eval, including indirect eval at the implementation’s discretion.eval in Edition 4 terms, to facilitate interoperation among backward-compatible implementations.eval application in Edition 3? I recall someone wanting to force global scope, but that’s incompatible and unnecessary. If the problem is the ability of eval to add bindings to its dynamic scope, let’s fix that by making something like eval(”let {...}”) instead of eval(”...”) be sweeter enough that it wins over time. We could even define eval “...” (the unary operator expression) as the new let-like way.eval “...”. — Brendan Eich 2007/01/22 11:44this in a nested function called by the function’s name from the outer function should bind to the outer this.undefined, NaN, and Infinity in the global object should be DontDelete and ReadOnly.String.fromCharCode.length === 1 in Edition 3, but should be 0 to tell the truth.new RegExp(”pattern”) and /pattern/ mean different things: the latter is not created anew every time it is evaluated. This is usually surprising and is probably a historical accident? [Brendan says it was a mistake that optimized the wrong good.] In the context of E4X it will be more surprising still, since evaluating <tag>content</tag> yields a new XML object every time.s[i] is equivalent to s.charAt(i), but it does not depend on charAt (which may be overridden or even deleted).Array.prototype.indexOf and .lastIndexOf methods. These take a value to find in the array, and an optional starting index.js> var a = { valueOf:function() { print("a");return 1} } var b = { valueOf:function() { print("b");return 1} } a<b a b false js> a>b a b false
Please feel free to add directly to this list. Also holler if something looks too big to be a “bug fix”, and deserves a separate proposal.
These issues are split out as separate proposals but the list is preserved here just to have it.
typeof cleanups s[i:j] where s is a sequence-like type (Array, String, etc.). On the left-hand side of assignment this expresses a slice operation. The advantages, as with s[i], are conciseness and optimizability.Array and String generic methods, to relieve users from having to write Array.prototype.slice.apply(arraylike, i, j), e.g. (see Array and String generics for a short example, and some motivational blogging from a JS guru).map, reduce, filter, each, some, and every (see SpiderMonkey's array extras for a prototype that lacks reduce and renames each to forEach). — Brendan Eich / Lars T Hansen / Jeff Dyer various dates