- From: Erik Arvidsson <arv@chromium.org>
- Date: Mon, 24 Oct 2011 19:40:28 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Eric U <ericu@google.com>, Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>
On Mon, Oct 24, 2011 at 16:46, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Easy. The destructuring stuff proposed for ES lets you easily say things like:
>
> function(blobparts..., keywordargs) {
> // blobparts is an array of all but the last arg
> // keywordargs is the last arg
> }
>
> or even:
>
> function(blobparts..., {contenttype, lineendings}) {
> // blobparts is an array of all but the last arg
> // contenttype and lineendings are pulled from the
> // last arg, if it's an object with those properties
> }
Nope. The rest parameter must be the last parameter.
This is already in the latest draft for edition 6.
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
See "13 Function Definition".
Received on Tuesday, 25 October 2011 02:41:14 UTC