January 19 meeting notes

Mark S. Miller erights at google.com
Fri Jan 20 10:15:13 PST 2012


On Fri, Jan 20, 2012 at 9:57 AM, Herby Vojčík <herby at mailbox.sk> wrote:

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


Another case together with this one seems to force us into "Single scope,
args are vars":

    function foo(e) { var e ... }

The "var e" is currently accepted in both strict and non-strict as a
redundant declaration of the same variable, no shadowing or error. We can't
break this. And we can't explain it if params are "let" bindings.

If it turns out to be practically backwards compatible, we would like to
explain "} catch (e) {" as a let binding of "e", leading to a simpler
explanation of its block-local scope. The hard case is

  } catch (e) { var e ... }

which would have to become an error. We don't yet know if this new breakage
would create actual problems in practice.


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120120/b9db8787/attachment.html>


More information about the es-discuss mailing list