Reading Your Future

In the Scala courses I've developed for Marakana, we spend a good amount of time on monads. We've produced an introductory video tutorial on monads, and how they can help keep your code readable.

For anybody who enjoyed that video, or is curious about how monads can help with other real-world software design problems, you might also like this post on the Future and Reader monads that I just published on my personal blog. It covers how we can do arbitrarily deep composition of asynchronous (i.e. long-running or blocking) tasks, and how we can do dependency injection cleanly with no external frameworks. Interestingly, these two design problems end up having almost identical solutions in the monadic world!


Published July 25, 2012