Put your bash code in functions
ricardoanderegg.com
ricardoanderegg.com
You need to put the three commands into seperate lines for your sanity. Too close to &&
await first
await second
So lots of people might not ever think to do it the other way. If you don't have intimate knowledge of how promises work and what async/await really do, you might not even realize that this is wrong. await parallel(first, two)
If your concern is clunkiness, I'm curious about callbacks, they're definitely more complex to use.I understand your point that not knowing how promises work can lead to not optimizing them, but going from one to the second can easily done on another iteration. On the other hand, not being capable with callbacks can easily lead to (callback) hell, then you need to first fix the mess, then optimize.