>   you have to handle "err" return code in each line. Doubles the amount
of code

I don't know what you mean "for each line".  The line `x=2` can't throw an
error.  I find I have to do a line like this after each call with a
possible error callback ...

      if err then log "module bird: fling failed for bird: ', bird.name;
return err

I just looked at some random code files from my app and here are the
results for several files ...

file1: 63 lines, 1 err line
file2: 291 lines, 12 err lines
file3: 42 lines, 4 err lines

So it ranges from 2% to 10% of the lines in my code.  Even if my selection
of random files were accidentally biased, the results will not be near the
50% you claimed.  Your eyesight is really bad if those err lines make the
forest hard to see.

BTW, some very famous language designers at Google are forcing everyone to
use this error handling technique in the new GO language.

>  in the proposed optimal solution

Once again you are talking about this mythical *optimal* solution.  What
solution are you talking about?  There is no such thing. Handing async
callbacks is inherently hard and I doubt there will ever be a magic fix.

A lot of people would like this magic fix but it ain't gonna happen.  Get
over it.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to