Finish this sentence: I would use native promises (instead of bluebird, RSVP) if only they _________.
-
-
well, this just to programmer pragmatism. with browser promises we will still carry polyfills => more complicated witout benifit.
-
standard promises have to exist because async APIs have to return something.
-
the only promise-d api i know is fetch. and it's redundant. with CBs it was so simple - u use promises in applogic, cb in api calls
-
standard callback patterns are not intrinsically simpler than promises and more error prone (ever seen a cb run twice? I have)
-
but at this point, its too late to change direction. we already have CB apis and they are to stay. having 2 conventions=flustercluck
-
there is no one reliable convention. The callback convention is implemented wrong (cb called multiple times, wrong order) often
-
and XHR isn't even close to a standard callback pattern (nor IDB)
-
btw there are way more than just fetch using promises: animation, quota management, web midi, streams, font load, etc etc etc
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.