Ask HN: JavaScript Async/Await Experiences

1 points by redisman ↗ HN
In my nodejs projects I've still mostly been using the async library [ http://caolan.github.io/async/v3/ ]. I noticed that they (and everyone else?) has now moved to the new async/await syntax and the synchronous-looking syntax does look appealing. Especially since I worked with C# MVC for a bit where that pattern is heavily used and very nice syntactic sugar.

Most of the asynchronous code we build is for calling various APIs and databases and all manners of compositions built out of those blocks. So there's often lots of "do all these things, then do this when they are all finished and then return a response"

Question: How was your experience migrating to the new syntax? Good/bad/unexpected issues, examples of some non-toy-project using it, was it worth it, does it feel well designed/intuitive...

2 comments

[ 3.4 ms ] story [ 17.7 ms ] thread
I'm learning front end dev currently with a background in Python and C++. For me, it has been difficult.
I just experienced a feeling today looking at a tutorial of tensorflow.js that perhaps people were using async await to get out of having to think about asynchronicity and that as a consequence the asynchronous nature of JavaScript is not used to its full potential sometimes.

But I have also had feelings that anync await is beneficial when writing crawlers.