isiahmeadows at gmail.com
Fri Oct 9 18:16:42 UTC 2015
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
probably larger issues in the algorithm itself.
On Fri, Oct 9, 2015, 08:48 Andy Earnshaw <andyearnshaw at gmail.com> wrote:
> On Wed, 7 Oct 2015 at 19:59 Isiah Meadows <isiahmeadows at gmail.com> wrote:
>> Andy, look at my most recent post to this list. What do you think of that
> CoffeeScript appears to have exactly the behaviour I (and most others,
> presumably) would have expected. I agree that the code in your gist is
> tricky to follow as a result of this limitation on rest params and not
> easily optimised.
> As far as I can tell, the main argument against is that the use cases
> aren't compelling enough to warrant the additional complexity in the spec.
> You said yourself that yours wasn't a common use case and although the
> callback-at-the-end pattern is pretty common, that's not so much an
> argument for rest in the middle as much as it is for defaults in the middle.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss