January 19 meeting notes

Herby Vojčík herby at mailbox.sk
Fri Jan 20 09:57:06 PST 2012

Allen Wirfs-Brock wrote:
> On Jan 20, 2012, at 6:22 AM, Herby Vojčík wrote:
>> +1. I see no point why let e; should not shadow argument e here.
> In general, the binding rules for function parameters were decided at
> the Nov. 2011 meeting (see Nov 16 meeting notes):
>> MarkM: Two-scope model (one scope for parameters, an independent inner
>> scope for let, const, and var bindings). This model is
>> upwards-compatible with ES5.1 strict because the latter disallows
>> shadowing of a parameter by a binding in function scope.
>> Allen: Two-scope model, but with inner scope prohibited from shadowing
>> parameters.
>> MarkM: Likes this. Any program that is accepted works with either of
>> the two-scope model intuitions.
> Whether you view this has two scopes with static semantic rules that
> prohibit inner declarations from shadowing or a single scope with
> appropriate static semantic rules that prevent redeclaration of formals,
> the effect is essentially the same. The current specification draft
> actually uses a single environment record and appropriate static
> semantic rules. However you model it in terms of scopes, the intent is
> that the function formal parameters and the top level declarations are
> treated as a single naming contour for the purposes of allowing or
> disallowing duplicate declarations.
> ...

"Single scope, args are lets" view is making sense of this. Ok, thanks.

> Allen


More information about the es-discuss mailing list