David Bruant wrote:
I'm happy of the outcome of the thread if .findIndex is introduced,
but I can't help wondering whether a new method is going to be
introduced every single time someone brings up a pattern that would
make good use of stopping an interation early.
Lacking an iteration protocol, that's the natural tendency, although
there are only so many methods and method-variations likely to be needed.
With for-of, stopping early is done by a break in the body.
Inventing synonyms for exceptions (endframe) or adding escape
continuations for more locally structured control effects could be done,
but why? I think we're nearly "done" (no pun!).
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss