Re: Is BlobBuilder needed?

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