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

Yeah, it's a false positive identification of the XY problem.

The audience falsely identifies your problem as an XY problem. This is, IME, due to the audience wanting to refactor the problem into something they can understand.

It's worse in JavaScript probl ms, where, due to the actual inability to do something simple like pause the runtime for 5s, the experts all spend tons of effort trying to convince you that there is no situation in which this is reasonable rather than simply say the runtime environment is too crippled to allow this.

It's nonsense of course.



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: