Hacker News new | ask | show | jobs
by olalonde 4443 days ago
The author does not seem like an experienced Node.js developer. All those

    if (err) {
      done(err);
    }
    else {
      // ...
    }
are usually written in this style:

   if (err) return done(err);
   // ...
I personally don't like promises and tend to avoid libraries who use them. I don't really see the problem they are trying to solve which is not already solvable in a more flexible way through libraries like async.
1 comments

I agree that libraries should not be handling errors in any unusual way, or better yet just re/throw them and let consumer take care of that. That's where the promises/zones might be useful.
Right. I don't mind if people want to use promises in their own code as long as they don't force their use on library users.