Skip to content

Comment on Node.js - A Giant Step Backwardsparent

Comments

I can't understand why.

Why?

For starters since it event based nothing can happen until you give back control to event loop. Secondly if you add another callback or errback to a Deferred that has already been fired it just calls it with the last result. Note, Deferred is much simpler than I imagine you are thinking it is. It does nothing to handle events it is just a first class way to represent the flow of code.

so adding a callback runs it if there is a result. thanks

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.