Hacker News new | ask | show | jobs
by vips7L 998 days ago
> blocking code is objectively easier to reason about than “jumping around” code.

This is precisely why await was introduced in the first place. Promise and callback code was impossible to reason about.

1 comments

A Promise is not ordinary blocking code.

String res = someRestCall();

is.

I was agreeing with you. They introduced await because they know that

    var s = await someCall();
is way easier to reason about than:

    someCall().then(…)
Oh, I see! Sorry for the misunderstanding!