let/const in switch cases

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Aug 14 08:57:34 PDT 2012


On Aug 14, 2012, at 5:05 AM, Andreas Rossberg wrote:

> On 10 August 2012 05:48, Brendan Eich <brendan at mozilla.org> 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).

As a point of process, it would be great if when implementors found themselves in this situations that they write up a wiki stawman for the semantics they decided to implement.  That way we can all review them and discuss whether they are the semantics we want to adopt for the specification. Even better, do that before deciding to implement.

Allen


More information about the es-discuss mailing list