This looks pretty neat. Having worked with async code before Promises were everywhere, they are a real trip to learn to use. Although the idea is used throughout the programming stack, it's definitely something useful to learn.
I think the coolest part of async/await style is that you can use try/catch to get errors instead of having to add a new function for every promise you unwrap.
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
This looks pretty neat. Having worked with async code before Promises were everywhere, they are a real trip to learn to use. Although the idea is used throughout the programming stack, it's definitely something useful to learn.
I think the coolest part of async/await style is that you can use try/catch to get errors instead of having to add a new function for every promise you unwrap.
Haha that's interesting! That was actually the main reason I disliked
async/await
, I had to wrap everything in atry/catch
.Guess it all depends on what your preferences are.