point 1 is utopia since ...varname breaks syntax in any case
second point would be easier like this ?
function (arg1obj={a,b,c}, p=[x,y]) {
}
On Wed, Oct 26, 2011 at 8:27 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote:
1) arguments is needed for backwards compatability (no migration tax)
On 26 October 2011 20:27, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
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];
On Oct 27, 2011, at 12:04 AM, Andrea Giammarchi wrote:
point 1 is utopia since ...varname breaks syntax in any case
No, you missed the point. this need to be valid Harmony code in order to
avoid a migration tax:
function f() {
return g.apply(undefined,arguments);
}
no ... or any other
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___
5 matches
Mail list logo