January 16, 2012 11:32 AM

On Jan 16, 2012, at 11:09 AM, Brendan Eich wrote:
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

Right, got that -- it's why I wrote "unmangled". Sorry to be unclear. I'm supposing code of this form

   foo  {||
       exit: {
            ...
            if (...) {
                "early";
                break exit
            }
            ...
        }
   }
   ...
   with (O)
       S;


got mangled into code of this form:


   foo  {||
       exit: {
            ...
            if (...) {
                "early";
                break exit
   with (O)
       S;

 
and all braces still matched -- and then a newline was lost. Yes, it's unlikely and minifiers must ensure semicolons are inserted, etc. Still a source of angst because the bad thing might go undetected.

If block-lambdas require version opt-in, then of course 'with' statements are early errors. That helps, but break L with E would be a general statement form, IIUC, so not just for block-lambdas. We'd have to say this new syntax requires version opt-in (something I'm arguing against in reply to Andreas R.).

Sorry to make a small hill out of a mole hill -- not my intention, but my angsty spider-sense is tingling when 'with' makes come-backs of this kind...

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

Reply via email to