5 ms·
Is it just me, or does their example of the traditional way of doing those calls user literally the least efficient possible way of writing that code? Surely u
by llamaLord 4y ago
Is it just me, or does their example of the traditional way of doing those calls user literally the least efficient possible way of writing that code?
Surely using async/await would get you to something nearly as clean as their end-state
- cyanydeez 4y agoAlso, V8 is being abandoned very quickly because how poorly it's build quality effects development so that costant flattery of V8 seems to suggest some kind of blinders.
- wolfgang42 4y agoThe 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.