isiahmeadows at gmail.com
Mon Oct 5 10:44:12 UTC 2015
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. 
As for optimization, that's probably the bigger issue. It's not very
easily optimizable in my experience, even statically (much less at
runtime). The code I usually have to write in those cases gets ugly in
a hurry, and it's not a common use case. Example (it's LiveScript,
which also has this, equivalent (not compiled) ES5, and equivalent
ES6): . Obviously, in that example, the ES5 version is a little out
of hand, using array hacks in the name of speed, but the ES6 version
isn't exactly pretty, and that isn't even as focused on engine speed.
If you want to optimize this, good luck. The ES5 version isn't that
far off of what low-level hacks would be needed to make it efficient.
Note that LiveScript does exactly the same thing as CoffeeScript in this case.
On Sat, Oct 3, 2015 at 3:50 AM, Michaël Rouges <michael.rouges at gmail.com> wrote:
> 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
> es-discuss at mozilla.org
More information about the es-discuss