Šime Vidas
Feb 23, 2017 · 1 min read

Your use of memoize and Promise.all indicates that JavaScript, as it stands, is missing some syntax and/or APIs, since your use case — two parallel branches, one of them containing two sequential tasks — seems simple enough, and yet, the combination of promises and awaits (your least favorite solution) isn’t optimal. Maybe we need a syntax/API proposal to enable a more intuitive pattern for this use case.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade