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

It's just mountains of unnecessary extra code that is error prone because you have to manually wire it. When you chain a promise or promisify a callback instead of using a deferred or the promise constructor (both are just as evil here), the wiring is done implicitly and there is a lot less code.

Edit: What I mean by "wiring" is that you need to make sure that in all successful code paths `deferred.resolve` is called and that in all erroneous code paths (not always a single try catch either) `deferred.reject` is called.



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

Search: