Hacker News new | past | comments | ask | show | jobs | submit login

Forgive me for going a little off topic here but is it really true that JS was async-friendly from day 1? When I started using JS seriously 8 years ago, async code was horrible (callback hell, etc.) The web standards guys retrofitted native async way after the matter.



Doesn‘t this more or less mean "the only execution environment is event based, has a run loop outside of your control and calls your code whenever it wants" and "there is no busy sleep". So it was callback based from day one. Is that the same as async? I think it is?


That makes sense, thanks! It has indeed been run in a loop from the start despite the poor ergonomics - I did not think of it in that light.


async/await is just syntax sugar around promises which are a just a nice way of organizing callbacks, so yes I'd say it's true.


Probably more accurate to say it was async from day one. Which people probably realized the first time they had to deal with setTimeout

The original promises syntax and chaining in ES6 were not particularly user friendly.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: