Le 10/07/2013 19:28, Brendan Eich a écrit :
David Bruant wrote:
I can't find it anymore, but I read a message from Mike Shaver (I think it was him) saying that these methods have been standardized after SpiderMonkey implementation without other form of rationale.
Who needs this particular consistency anyway?

Users generally benefit from this kind of consistency; we hear complaints about reduce/reduceRight.
People seem to have survived reduce/reduceRight.

The perf savings is an allocation
Do engines allocate each time when a function expression is used as first argument?
If so, .bind doesn't cost more than a function expression.

but the cognitive load win seems more important. Telling people to use .bind (polyfilled) involves more typing and thinking.
I guess... Are reduce/reduceRight acquiring a thisArg, then?

David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to