Re: missing non-rest_parameters should throw error

2011-10-27 Thread Andrea Giammarchi
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)

Re: missing non-rest_parameters should throw error

2011-10-27 Thread Andreas Rossberg
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];   

Re: missing non-rest_parameters should throw error

2011-10-27 Thread Allen Wirfs-Brock
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

Re: missing non-rest_parameters should throw error

2011-10-26 Thread Andrea Giammarchi
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,

Re: missing non-rest_parameters should throw error

2011-10-26 Thread Allen Wirfs-Brock
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___