4 ms·
The page is “Copyright 2012-2021”, which would place it around the time that Promises/A+ was just getting started. That code example is a prime specimen of the
by wolfgang42 4y ago
The page is “Copyright 2012-2021”, which would place it around the time that Promises/A+ was just getting started. That code example is a prime specimen of the all-too-common “callback hell” that led to the creation of promises and eventually async/await; what we’re looking at here is effectively an alternate-universe way of solving the same problem.
It sounds like FibJS supports async/await as well, but that just means there are two ways of doing things: I suspect a big reason promises won out is because they could be easily polyfilled into browsers, and a bit part of NodeJS’s appeal was using the same libraries on both sides.