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

It would break the same as sprinkling "await" all around your codebase. Asynchrony in general is not free - you have to redesign around it regardless, and deal with the issues it introduces.


Callbacks have been in Javascript since the beginning, and await is basically syntactic sugar for that.

Having everything switch to blocking and have to start using mutexes and other multithreading primitives would be a giant change to the language.


Callbacks have been there, but most code wasn't written with that in mind. And you still need some synchronization in async code - even if it's all scheduled on a single thread - due to re-entrancy issues.




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

Search: