Skip to content

Instantly share code, notes, and snippets.

@rking
Created March 30, 2013 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rking/5278879 to your computer and use it in GitHub Desktop.
Save rking/5278879 to your computer and use it in GitHub Desktop.
233615 <rking> Hi guys. I'm an async n00b. Is there a broad distinction between promises/futures/deferrables?
233623 <rking> And what do JS people use?
233628 <Norm_> niggler: thanks for the help
233643 <niggler> rking why not plain old callbacks?
233757 <DarkArgon> where do i find docs for the events in express? for example res.on('header')
234045 <rking> niggler: I'm not sure.
234137 <rking> niggler: What about stuffing them into an Array?
234209 <niggler> rking what are you trying to do? the common first-step is `async`
234227 <niggler> https://npmjs.org/package/async
234404 <rking> niggler: I'm not really sure. I'm just exploring ways of coding that are foreign to me.
234416 <rking> BTW a friend just pointed this out to me, and it's entirely about your question: http://blog.jcoglan.com/2013/03/30/callbacks-are-imperative-promises-are-functional-nodes-biggest-missed-opportunity/
234506 <bnoordhuis> ^ just saw that on HN
234512 <niggler> those are all cute but ultimately callbacks are conceptually simpler
234525 <bnoordhuis> let's not forget node 0.1 had promises
234532 <bnoordhuis> they were pretty much a disaster
234616 <niggler> I'm convinced at this point bnoordhuis there are two types of programmers: those who care about shit like promises and those who get shit done
234642 <bnoordhuis> i don't disagree :)
234736 <bnoordhuis> it's good that people are looking beyond what's already there
234740 <cracken> but do you promise?
234742 <bnoordhuis> but for now we're stuck with callbacks
234814 <cracken> can't you create your own promise fairly easily
234829 <bnoordhuis> yes. people do it a lot
234843 <bnoordhuis> no one implementation has taken the node ecosystem by storm
234852 <bnoordhuis> read into that what you will
234913 <cracken> that it's not really that important
234916 <niggler> whereas "async" has :)
234948 <bnoordhuis> well... async and step have been around since nearly the beginning
235040 <bnoordhuis> they're not necessarily the Endlosung to one's callback woes
235051 <bnoordhuis> but they work and they're pretty battle-tested by now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment