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

Too bad the code is so nasty


How so? IMHO, it's an elegant demonstration of the async module.


But is the async module itself elegant? I guess it's relative, it's even less elegant not to use the module. The async module is still a hack, the cleanest one Node has.

I think the whole discussion about "cancer" wouldn't have happened if the V8 team added continuations by now. They mentioned that they will so we might be cleaning up big chunks of code.

It's funny how a tech can get so popular with these big warts. Probably because people use it in a very limited way, no one writes CPU intensive code because you rarely need it for serving sites and data. Then the clumsy callbacks aren't so bad.


Check out the Cilk version, which is not only concurrent but parallel as well: http://myxman.org/dp/node/182

I agree with jerf that either you shouldn't have to worry about splitting your computation at all or at least you should have syntactic sugar for it. The Node solution has much more noise than code.



http://hpaste.org/52109, in case one prefers to be more explicit.


It's beautiful how node takes a 2 line algorithm and turns it into 20 lines of twisted magic, lest you block all your connections.




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

Search: