January 19 meeting notes

Andreas Rossberg rossberg at google.com
Mon Jan 23 02:29:17 PST 2012

On 23 January 2012 10:12, Andy Wingo <wingo at igalia.com> wrote:
> On Fri, 2012-01-20 at 19:19 +0100, Andreas Rossberg wrote:
>> How is
>>   function(x) { let x }
>> any different in this respect from
>>   { let x { let x } }
> In the former, there is no part of the body in which the parameter is
> visible (modulo arguments, of course).  I can see how that might be
> confusing if the "let" appears later in the function:
>   function(x) { bar(x) ... ... let x = 2; ... }
> Of course, the same argument applies to blocks, but in that case there
> is more syntactic uniformity.

Not sure what "syntactic uniformity" you are referring to. This is a
problem with the block-scoping semantics in general (which,
unfortunately, seems unavoidable in JS). It makes no difference
whether the outer x is bound by `let', by `catch', by `var', by
`module', or anything else. Except as an argument of `function' (and
only if it is directly enclosing), for which we plan to introduce a
special case. This irregularity is what I was wondering about.


More information about the es-discuss mailing list