Async javascript is much more fun when you memoize.
Daniel Brain
73111

This article just highlighted for me how incomplete the async/await approach is in the new spec. Memoizing feels like a such a hack to get this kind of functionality, but it really is a good solution considering the constraints, keeping the speed without sacrificing readability (and only the relatively minor overhead of the memoization objects).

Interestingly, Python’s recent implementation of async/await is not sequential and doesn’t block non-dependent code. Not sure why this wasn’t considered for JS (even if only using something concurrent)

Like what you read? Give Byron Houwens a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.