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

  > Still, most libraries are blocking*
  > * Which is a funny objection, like being 
  > mad that most libraries default to using
  > decimal numbers rather than octal. It must
  > be a conspiracy!
Actually, there _is_ a distinction here: It is ridiculously easy to implement blocking semantics on top of non-blocking semantics - in some pseudo code:

  event = do_async();
  pause_until_completion_or_error(event)
Whereas implementing non-blocking semantics using an underlying blocking implementation is quite, but not entirely, like banging your head against the wall. repeatedly. Essentially, you cannot avoid threads, shared mutable state, and a lot of other problems.


This may surprise some, but implementing blocking semantics on top of non-blocking semantics in node.js is impossible.




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

Search: