return when desugaring to closures

Mark S. Miller erights at google.com
Tue Oct 21 16:38:58 PDT 2008


On Tue, Oct 21, 2008 at 3:42 PM, Waldemar Horwat <waldemar at google.com> wrote:
> What does ES3.1 do if you have both const x and var x at the top level?

It just so happens that we discussed top level const in this morning's
ES3.1 phone meeting. It never occurred to us to ban top level const.
We did discuss making top level const scoped just to the program unit
vs adding a property to the global object. We also discussed the const
read barrier issue. Of your taxonomy of four choices, we had been
writing the spec on the assumption of dynamic dead zone, but we think
we would prefer static dead zone if its spec is simple enough and if
it's simple enough to understand in practice. Given the number of
choices and the complexity of choosing among them, especially our
ignorance of the implications of "static dead zone", we decided to
pull "const" from ES3.1. If we got in wrong in ES3.1, we couldn't fix
it later. All block scoping constructs -- const, let, and nested
function declarations -- now await Harmony.


-- 
    Cheers,
    --MarkM


More information about the Es-discuss mailing list