revive let blocks

Rick Waldron waldron.rick at
Thu Jun 18 15:30:49 UTC 2015

On Thu, Jun 18, 2015 at 9:54 AM Boris Zbarsky <bzbarsky at> wrote:

> On 6/18/15 9:01 AM, Kyle Simpson wrote:
> > In addition to the fact that this feature is long since co-existing in
> FF and doesn't seem to have broken the web
> Firefox doesn't ship let support on the web by default yet.  For
> example, this HTML:
> <script>let x = 5;</script>
> will result in:
>    SyntaxError: missing ; before statement
> at the location of the 'x'.

Strange, this works in the console, but not in a script

> You have to explicitly opt in to let support in Firefox right now via
> language="javascript1.8" or similar.

More importantly, the only reason `let (names) {}` "co-exists" in those
special opt-in versions is because `let` is not allowed as an identifier.
The issue that Gary Guo pointed out is a very real breaking change for the

Using language="javascript1.8" will make all of these result in

  var let = 1;
  var let = function() {};
  function let() {}

Otherwise this would be ambiguous:

  let (a)

Adding this non-standard restriction prevented authors from using `let` as
an identifier.

I wonder if some application of `[no LineTerminator here]` might make this
work? Is it worth it?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list