arrow syntax unnecessary and the idea that "function" is too long

Brendan Eich brendan at mozilla.com
Sun May 15 14:44:07 PDT 2011


On May 15, 2011, at 1:52 PM, Dmitry A. Soshnikov wrote:

>> Each evaluation of a given function expression gives a fresh object in JS today. WIth joining as Mark proposed at
>> 
>> http://wiki.ecmascript.org/doku.php?id=strawman:const_functions#joining
> 
> Got it. Though it still seems to me as just an implementation optimization without need to specify explicitly that a function is closed (without free variables) and thus can be optimized, i.e. created once and stored as some internal property.

We would want to specify the optimization in order to make === and egal constant time (i.e., based on pointer not value comparison). This matters for WeakMaps keyed by joined functions.

/be


More information about the es-discuss mailing list