On Jan 16, 2012, at 11:09 AM, Brendan Eich wrote:

> With completion values as In ES1-5, not even depending on 
> http://wiki.ecmascript.org/doku.php?id=harmony:completion_reform, it might be 
> enough to say:

You're right, according to ES 5 semantics this does provide "early" as the 
value of the labelled block.

> 
> 
>    foo  {||
>        exit: {
>             ...
>             if (...) {
>                 "early";
>                 break exit;
>             }
>             ...
>         }
>    }
> 
> 
> IINM this would work. Sugaring it using 'with' looks nice -- always tempting 
> to re-use 'with'.

and if fact it does work in the browsers I tested (without the block lambda), 
so I was wrong when I said there was no way to supply the completion value. But 
the sugaring is much more explicit.


> 
> I have some angst about loss of a hunk of code running "break L" up against " 
> with (E)\nS" where E is an expression and S is a statement and the two came 
> from a bone-fide with statement later in the unmangled source.

that's why I would require a [no LineTerminator here] before the with clause of 
a break statement

> 
> /be

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

Reply via email to