News for hackers. Stuff that matters.
Re:Akka Futures In Scala With A Simple Example by noelwelsh on Monday January 14, 2013 @04:31AM (#5053936)
Let me expand: there is nothing in the type system that will make you handle exceptions in Futures, in the way that Option or Either make you handle the failure case. It is easy for a Future to fail and you to never see a stack trace. E.g. this will silently fail:

  Future { 1 / 0 }
An alternative is to encode the possibility of failure in the type system by using Future[Validation[E,A]] (replace Validation with Try or Either as the whim takes you). Then the type system will remind you to handle the failure case. See my link above for more (scroll down a bit to see the section on error handling).

There are no comments on this comment yet.