Node.js never had promises, not until native came in with V8.
What was called promises in few old versions (last one was v0.1.29) was purely a simple extension to event emitter, nothing more (no then, no nested resolution, it had nothing to do with promises which we work with now)
Still, it's true, core Node.js members didn't believe in promise interface even when Promise A+ started to be really popular. It's only after it became a part of a standard, things changed. async/await was delivered in Node.js on par with browsers, soon after we also got fs.promises.
Anyway to this day (as lighter, and not introducing artificial ticks) callbacks are faster than promises, but for most of real world scenarios difference can be safely ignored.
Senior Fullstack Engineer with 10+ years of proven track record of delivering software at scale in startup and enterprise environments. I am most comfortable working across the stack with JavaScript,
Thanks for the suggestion. And thanks a lot for the reference to the v0.1 docs. I will take a closer look and update where appropriate. Much appreciated!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Node.js never had promises, not until native came in with V8.
What was called promises in few old versions (last one was v0.1.29) was purely a simple extension to event emitter, nothing more (no
then
, no nested resolution, it had nothing to do with promises which we work with now)You may confirm that at still available documentation: nodejs.org/docs/v0.1.29/api.html#_...
Still, it's true, core Node.js members didn't believe in promise interface even when Promise A+ started to be really popular. It's only after it became a part of a standard, things changed. async/await was delivered in Node.js on par with browsers, soon after we also got
fs.promises
.Anyway to this day (as lighter, and not introducing artificial ticks) callbacks are faster than promises, but for most of real world scenarios difference can be safely ignored.
Thanks for the suggestion. And thanks a lot for the reference to the
v0.1
docs. I will take a closer look and update where appropriate. Much appreciated!