# TC39 acceptance

The arrow function syntax proposal has been accepted to be part
of ES6, and it has been in the ES6 draft specs since May 2012
<http://wiki.ecmascript.org/doku.php?id=harmony:arrow_function_syntax>

There has been discussion in es-discuss and TC39 meetings about
arrow-functions and how they interact with the rest of the semantics
of the language, and apart from minor clarifications the proposal has
remained stable along the time. It is very unlikely that the spec for
arrow functions would change in significative ways.


# Interest from other vendors

Firefox/SpiderMonkey already implements arrrow functions since version 22
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/arrow_functions>


# Technical considerations

Implementing arrow function would have a small impact in V8: most
changes fall in the parser/lexer; the existing representation for
functions would be reused with minor changes.


# Implementation/testing

This patch implements parsing of arrow functions under the
`--harmony_arrow_functions` flag and an unit test for valid
syntax: <https://codereview.chromium.org/160073006/>. After this,
patches would be needed to implement correct scoping of “this”,
“super” and “arguments” in arrow functions (I am working on
those already).


-Adrian

Attachment: pgp820NDfD2HX.pgp
Description: PGP signature

Reply via email to