Hacker News new | ask | show | jobs
by shauns 2145 days ago
I think people miss the wait part of await and hence forget they can separate the creation and consumption of a promise. Should have been called waitFor!
1 comments

As a non-JS person, I thought it was obvious what await does, but now I'm second guessing myself. What does it do that's not the "wait" part? Is it not simply causing a normally asynchronous function to block?

Edit: Sorry for the late edit, but: Is it because users are using it thinking it just "unwraps" a promise into its resulting value? I can begin to understand that, but it seems so incidental to the primary concept of "waiting" for something asynchronous to return.