I understand, but (as you seem to concede below) if the TCP violation this introduces is enough to kill it, I thought I'd argue against it on that basis. Sorry for seeming to miss your larger point -- I am following it closely too ;-).
Understood.
Oh! I didn't know that. Often we (certainly I do this, others too) use bars in such sketches as meta not concrete syntax. Thanks for clarifying. Anyway, as others have written, this seems an abuse of 'continue'. Also, you cannot avoid the exception-like effect if this is to propagate to the forEach's internal loop. There's no loop visible to the spec or an implementation's compiler. So this really is a throwing form. Again I do not see how it can be "exception-less".
Local return violates TCP, so we should debate that vs. convenience if you like. Sorry if that is not something you want to debate, but I think you raised the issue directly and should respond.
Agreed. But let's debate the exception-less claim anyway, to each mutual understanding.
The problem is the loop in Array forEach, or any such dynamically dispatched caller of a block-lambda that is acting as a mapfun or iterator, is hidden from static analysis. So such a de-facto continue (I see what you mean now; I mentioned early return from forEach callback as continue myself) must throw. It cannot be exception-free. Sorry to harp on this, I wonder if one of us is still misunderstanding something.
Yes.
This reminds me of dherman's escape continuation proposal: http://wiki.ecmascript.org/doku.php?id=strawman:return_to_label We did not promote it from Strawman to Harmony status.
Block-lambdas can escape via the heap and be called later (so-called async. callbacks). That is not a problem if they do not use return, break, or continue. The TCP conformance for |this| is still a win. The completion implicit return can be a win too. /be
[Finally trimming overcites!] /be |
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss


