Revenge of the double-curly [Was: return when desugaring to closures]

Brendan Eich brendan at
Fri Oct 10 08:55:14 PDT 2008

On Oct 10, 2008, at 5:44 AM, P T Withington wrote:

> On 2008-10-10, at 02:29EDT, Brendan Eich wrote:
>> An agreement from TC39 this past spring was that function definitions
>> directly nested in blocks, not specified by ES3, defined block-local
>> (let) bindings.
> Holy smokes.  Does that mean we are all going to be writing
>   function ... () {{
>     ...
>   }}
> to get 'normal' scoping of function body declarations???

No. My words were unclear, sorry. I wrote "defined block-local (let)  
bindings" meaning the functions defined in blocks bound *their own  
names* only in the containing  block, not in the variable object.

>  Will `var`
> mean `let` in those double-curly bodies?

No, var and let mean the same thing at top level.


More information about the Es-discuss mailing list