On 26 October 2011 20:27, Allen Wirfs-Brock <[email protected]> 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];
>    ...

All languages I know with pattern matching facilities provide a simple
solution for that. E.g. in ML:

  fun (arg1 as {a,b,b}, arg2 as [x, y]) -> ...

We should really get rid of any need for using `arguments'. If your
example is a relevant use case then supporting something along these
lines in Harmony seems preferable, at least to me.

/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to