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

Inside of an asynchronous framework where every call blocks all others (eg Node.js), callback-based code is almost always going to be the right choice. If you can't immediately produce the answer, don't wait. And if you can immediately produce the answer but it will take a while, break it up into multiple smaller computations so that you do not block.

If you are in a different environment, the arguments for/against become much different.



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

Search: