http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters
Hi,
Here is the behavior I would like:
function f( a, b, ...rest ) { }
f( 1, 1 );// ok
f( 1, 1, 1 );// ok
f( 1, undefined );// ok
f( 1 );// Error: missing parameter
Because since you can't reference a and b as properties of an
I am not sure I am missing something but I think arguments could disappear
without problems, being easily simulated like this:
function f1(...arguments) {
f2.apply(this, arguments);
f2(...arguments);
let [a,b,c,...rest] = arguments;
// etc etc
}
Am I wrong ?
br
On Wed, Oct 26,
1) arguments is needed for backwards compatability (no migration tax)
2) it is useful with destructing parameters:
function ({a,b,c}, [x,y]) {
if (arguments.length 2) ...
...
var arg1obj = argruments[0];
...
Sent from Samsung tablet___
According to
http://wiki.ecmascript.org/doku.php?id=harmony:harmony
goal #2 of Harmony is:
Switch to a testable specification, ideally
a definitional interpreter hosted mostly in ES5.
Is there much activity toward this goal? The current ES6 drafts are
using mostly the same formalism
On Oct 26, 2011, at 12:08 PM, Michael Dyck wrote:
According to
http://wiki.ecmascript.org/doku.php?id=harmony:harmony
goal #2 of Harmony is:
Switch to a testable specification, ideally
a definitional interpreter hosted mostly in ES5.
Is there much activity toward this goal? The
Michael,
It took me a while to find them the first time I looked, but they are
downloadable here:
http://hg.ecmascript.org/tests/test262/
Instructions here:
http://wiki.ecmascript.org/doku.php?id=test262:command
On Wed, Oct 26, 2011 at 6:37 PM, Brendan Eich bren...@mozilla.com wrote:
On
Brendan Eich wrote:
On Oct 26, 2011, at 12:08 PM, Michael Dyck wrote:
According to
http://wiki.ecmascript.org/doku.php?id=harmony:harmony
goal #2 of Harmony is:
Switch to a testable specification, ideally
a definitional interpreter hosted mostly in ES5.
Is there much activity toward
Rick Waldron wrote:
Michael,
It took me a while to find them the first time I looked, but they are
downloadable here:
http://hg.ecmascript.org/tests/test262/
Instructions here:
http://wiki.ecmascript.org/doku.php?id=test262:command
Yup, I'm aware of the test262 project -- I even submitted
On Oct 26, 2011, at 5:02 PM, Michael Dyck wrote:
(I ask because, in my spare time, I'm developing a process that massages
the ES spec into an executable/testable form. So I wonder if I'm
duplicating existing work.)
Interesting -- you are writing an interpreter?
Yes, but not an interpreter
9 matches
Mail list logo