Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure what that's supposed to solve since you want to handle error/results at that top-level `async` in your example.

For example, in Javascript, you would often just have a top-level async function and stay inside async world the whole time.

Putting your example in the middle of some random code can already be done by calling a promise but not putting the downstream code inside its .then() block.

One of the nicest things about Javascript is the absolute simplicity of its concurrency model, one of those perks coming from its single-threaded nature. I look at something like C# and Kotlin with their BYO await semantics as something I'm glad Javascript doesn't have.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: