On Thu, Oct 9, 2008 at 5:31 PM, Brendan Eich <[EMAIL PROTECTED]> wrote: > > JS has break from labeled statement, and continue to labeled loop bottom, a > la Java. These look trouble-free to me. Let me know if you see a hard case. > Thanks, >
My question was whether the semantics of break and continue would support the following: while(true) { (function() { if (--x == 0) break; })(); } I honestly don't know, but it shouldn't cause any real trouble to allow it. The implementation would be analogous to that for labeled return. For example, if the appropriate while loop is no longer on the stack, the "break" would turn into an exception. As my usual disclaimer, I am not closely following the different ES trends including Harmony. I'm only commenting about what could possibly make the language more consistent and orthogonal. -Lex
_______________________________________________ Es-discuss mailing list Es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss