3 ms·
Promises are one of those features misunderstood for 2 reasons. Several leading initial library implementations were broken from day 1, and couldn't/wouldn't la
by justsml 9y ago
Promises are one of those features misunderstood for 2 reasons.
Several leading initial library implementations were broken from day 1, and couldn't/wouldn't later introduce breaking changes to existing users.
Another factor dragging down the impression of Promises: Google search seems to love returning 5+ year old articles. They almost universally suck.
Even the stuff I wrote back then was awful.
New articles are not necessarily spared, they often suffer from a number of issues: Overly Simplistic examples, fragile function boundaries, leaky variables, arbitrary 'design.'
I just updated my write-up on avoiding Promise anti-patterns: https://github.com/justsml/escape-from-callback-mountain/wiki/Beating-a-dead-horse%3F https://github.com/justsml/escape-from-callback-mountain/wik...
The main project's README shows how to rock modern Promises: https://github.com/justsml/escape-from-callback-mountain/ https://github.com/justsml/escape-from-callback-mountain/