News for hackers. Stuff that matters.
Re:Callbacks are imperative, promises are functional by spullara on Saturday March 30, 2013 @11:35PM (#5467597)
It is hard for me to fathom the negative feelings towards Promises. They are quite clearly a great way to perform async programming in a civilized way (see Twitter's Future/Promise in Finagle on github). JDK 8 will even have the equivalent in CompletableFuture. The only thing better is to combine Promises with coroutines for a more linear programming style like in Flow: http://www.foundationdb.com/white-papers/flow/
Re:Callbacks are imperative, promises are functional by markov_twain on Sunday March 31, 2013 @08:02AM (#5468445)
Thanks for this--I mentioned finagle to jcoglan on twitter yesterday after I read his blog post, and I don't think he was aware of the similarities.

I actually didn't know about futures until I learned about scala and finagle. I watched a talk on twitter's service stack given by marius eriksen and was blown away. My coworkers heard me rambling on about futures for weeks afterwards, and I found that it was difficult to explain what was so great about them. So I'm not surprised at the negative reactions in the comments here (although jcoglan did a much better job of exlaining them than I ever did).

Re:Callbacks are imperative, promises are functional by dschobel on Sunday March 31, 2013 @12:23AM (#5467697)
if you want this on the JVM today and can abide Scala, see: http://doc.akka.io/docs/akka/snapshot/scala/dataflow.html
Re:Callbacks are imperative, promises are functional by spullara on Sunday March 31, 2013 @02:27AM (#5467914)
The Twitter solution I mention above is in Scala — that said, I have one that also works in JDK 6/7 in a branch of https://github.com/spullara/java-future-jdk8.