I honestly wish engines (read: V8) didn't jave so much issue optimizing that. But yes, it's a very useful pattern.
On Thu, Feb 8, 2018, 14:35 Mark Miller <[email protected]> wrote: > Hi Claude, that's nice. Whenever I faced this issue I always turned to the > boolean flag variable. But this is strictly better. I expect to use it from > now on. Thanks! > > > On Thu, Feb 8, 2018 at 10:13 AM, Claude Pache <[email protected]> > wrote: > >> What about the following pattern (labelled block + break)? >> >> ```js >> processSuggestions: { >> let suggestions; >> try { >> suggestions = await fetchSuggestions(); >> } catch (e) { >> alert('Failed to load suggestions'); >> break processSuggestions; >> } >> showSuggestions(suggestions); >> } >> ``` >> >> —Claude >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > > > > -- > Cheers, > --MarkM > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

