The problem is just that coroutines are not natural in JS, and people will shoot themselves in the foot all the time.
Some "features" are better left out to allow a bigger audience to write reliable Software. Your milage may vary.
21 karma · joined May 31, 2010
The problem is just that coroutines are not natural in JS, and people will shoot themselves in the foot all the time.
Some "features" are better left out to allow a bigger audience to write reliable Software. Your milage may vary.
If a connection is closed, either by a timeout, or EOF, you simply check if the promised content length matches the count of received bytes - if not you should probably discard the whole thing (unless you're specifically supporting broken clients).
But then again, Erlang is probably a language more "suitable" to high concurrency programming, but node's goal is to make writing scalable networks programs possible for everyone. One might call it the PHP of concurrency : )
Basically callbacks and coroutines don't play well together.
But there were a bunch of reasons for the removal, performance and quality of the initial implementation also played into it AFAIK.
http://nodejs.org/jsconf2010.pdf
> Coroutines complicate the mental model while adding only cheap syntactic pleasures.
But afaik, that's pretty much never the case with file uploads, unless you are uploading a file that is still growing in size - so yeah, it's annoying : ).
('felixge2' because my other account is in noprocrast mode: )