Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A brief look at async-await. Parent comment
I'd actually say that it's the `Promise.all` that makes it sane, the await could be replaced by a `.then` and be functionally the same.
Actually it might be even easier to read to someone who doesn't live and breathe javascript as it will keep the program flowing top-to-bottom:
Promise.all([a(), b(), c()]).then(([a, b, c]) => { // do stuff... })
And if the individual functions have the custom error logic inside then a simple ".error(callback)" at the end it will just work.
I'd actually say that it's the `Promise.all` that makes it sane, the await could be replaced by a `.then` and be functionally the same.
Actually it might be even easier to read to someone who doesn't live and breathe javascript as it will keep the program flowing top-to-bottom:
As with most things javascript, there are 9 different ways of doing it, and 3 of them will shoot you in the face...