On 10 August 2012 05:48, Brendan Eich <[email protected]> wrote:
> Luke Hoban wrote:
>> Current Chrome builds appear to follow this approach, reporting that
>> the 'let' in the initial code sample above appears in an 'unprotected
>> statement context'.
>
> Are we all trying to follow the draft spec, or not? Thanks for proposing to
> change it first. Implementations deviating without talking first =
> disharmony.

To be fair, IIRC we implemented that before there was much of a spec
covering details like that. So we picked what we thought makes most
sense (and is most conservative).

Having said that, I fully agree with Luke. The switch statement is
what it is, unfortunately, and beyond repair, but to maintain scoping
sanity, we should rule out examples that mistake its body for a proper
block.

There is precedent for that in C++, where you cannot place non-trivial
declarations into a switch block either.

/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to