Re:Async/Await will make code simpler
by sim0n on Tuesday August 22, 2017 @12:22AM
(#15069678)
I personally think that the syntax is great considering it's being added to an existing language. await/async allows you to opt-in to having your code behave in a synchronous-like manner, when you want it to.
One of the best things about JS/Node is that you can wait on I/O from different sources at the same time and since the async/await syntax is just sugar over Promises, you can do things like:
One of the best things about JS/Node is that you can wait on I/O from different sources at the same time and since the async/await syntax is just sugar over Promises, you can do things like:
Instead of having to wait on I/O sequentially like: if awaiting were implicit.