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

> The function color problem is a bit overblown, it hasn't broken nodejs yet either.

It didn't break Node because Node avoids function color problem altogether. Nobody writes blocking code in Node due to its single-threaded nature.

Function color problem is the difficulty of mixing blocking and async functions. It's especially annoying in Python, where you have to spawn a thread to call blocking functions from async functions, and welcome to mutithreading bugs.

In Node the problem doesn't exist, because you don't block in its blocking functions. You either do `await f()` or `f().then()`.



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

Search: