Call me crazy, but I’d use postfix for a declaration of a rest parameter and 
prefix for spreading. To me, prefix feels like it does something, while postfix 
has more of a declarative feel.

function foo(a, rest...) {
    bar(...rest);
}

Whatever we choose, people will get used to it. So I don’t think it matters 
much.


On Apr 3, 2012, at 22:16 , Mark S. Miller wrote:

>     foo(a, b, ...rest)
> 
> vs
> 
>     foo(a, b, rest...)
> 
> Which is clearer?
> 
> ES6 has currently agreed on the first. English and Scheme agree on the second.
> 
> This question applies to both 
> <http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters> and 
> <http://wiki.ecmascript.org/doku.php?id=harmony:spread>.
> 
> -- 
>     Cheers,
>     --MarkM
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
a...@rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to