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

It’s true that with the way JS is designed, you almost never want to freeze up the entire program like that because it doesn’t exactly have threads so it would freeze the whole page or application even if you could. You can get a similar effect using async functions which can pause for a bit while still allowing events to be processed (or do it the old way using callbacks)

So both are true; yes, you almost never want to do that, and the reason you don’t is because is because of JavaScript’s design, which you could argue is a flaw but it does also have advantages



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

Search: