Comment #4 on issue 327 by [email protected]: Remove or simplify support for 'const'
http://code.google.com/p/v8/issues/detail?id=327

The semantics of "const", "let", and nested named function declarations in ES-Harmony has been settled for a long time. All of these bring their name into lexical scope throughout their enclosing block. Both "const" and "let" have a read barrier -- an attempt to read the variable before it has been initialized throws an error. Function names need no such read barrier, since they are initialized on block entry. See http://wiki.ecmascript.org/doku.php? id=harmony:const for how we apply these semantics to global code, where global
declarations need to be reflected as properties of the global object.

For ES5-nonstrict, I expect each browser will continue to do whatever it does today for each of these cases. For ES5-strict, I think it is important that one either reject these constructs with an early error, or implement the anticipated Harmony semantics. ES5-strict is gated by an opt-in. We do not yet know whether there will be an additional opt-in for Harmony. If not, then it is important that language extensions accepted by ES5-strict not be incompatible with
anticipated Harmony semantics.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to