And defaults can have rest parameters afterwards. But yeah, I know it's
convenient in a few cases, but I find myself in this situation rarely, so
I'm not sure if it merits being in the spec. Also, the ES6 version isn't
that much longer, and if a single `.pop()` becomes a bottleneck, there's
Damn, forgot the reply-all button the first time. Including the original
and reply here, plus my reply inline:
On Tue, 6 Oct 2015 at 19:05 Tab Atkins Jr. wrote:
> On Mon, Oct 5, 2015 at 6:33 AM, Andy Earnshaw
> wrote:
> > On Sat, 3 Oct 2015 at
I'm not trying to restart debate on this, but I do know CoffeeScript
allows it. It does a greedy grab, but it only allows a single spread
element, and default parameters take full precedence over rest
parameters in what is taken. [1]
As for optimization, that's probably the bigger issue. It's not
I understand better now ... Thanks a lot again...
And, sorry, Tab... to not deal with you on already debated topics.
I hope the following will not be one.
Michaël Rouges - https://github.com/Lcfvs - @Lcfvs
___
es-discuss mailing list
I guess this is another reason why promisified versions are better:
```js
somethingAsync(foo, bar, ...args).then(yourCallback)
```
On 2 October 2015 at 20:31, Michaël Rouges wrote:
> For me, the rest parameters must be unique per arguments list but,
> logically,
On Fri, Oct 2, 2015 at 12:09 PM, Steve Fink wrote:
> I don't know, but I can speculate. It's not at all obvious how ...args in
> the middle should behave: what if you have two rest arguments? Is that
> forbidden, or is one greedy? What if one of the trailing parameters has a
>
For me, the rest parameters must be unique per arguments list but,
logically, usable following the function requirements...
A classical example, the node.js methods, which takes a callback as last
argument, preceeded (generally) by one or more arguments, for a same method.
Michaël Rouges -
On 10/02/2015 11:52 AM, Michaël Rouges wrote:
Hi all,
I'm coming to you for a tiny question... excuse me if already replied...
Where the rest parameter are only declarable at the end of the
arguments list, like this, please?
`
void function (a, ...b, c) {
// b = [2, 3]
}(1, 2, 3, 4);
`
Any
For the undefined case, it isn't unexistent...
```JavaScript
void function () {
console.log(arguments.length); // 3
}(1, 2, undefined);
```
Then, I don't see how it may be ambiguous...
Michaël Rouges - https://github.com/Lcfvs - @Lcfvs
___
On Fri, Oct 2, 2015 at 3:00 PM, Michaël Rouges wrote:
> For the undefined case, it isn't unexistent...
>
> ```JavaScript
> void function () {
> console.log(arguments.length); // 3
> }(1, 2, undefined);
> ```
>
> Then, I don't see how it may be ambiguous...
Again,
10 matches
Mail list logo