Rúnar Óli Bjarnason: Dead-Simple Dependency Injection

Rúnar Óli Bjarnason (@runarorama) wrote the book on Functional Programming, well the Scala version at least. In this talk he shows how the Reader monad is used to inject dependencies into your Scala code. He starts with showing how functions can be curried and then generalised with Reader to avoid having your dependencies being explicitly passed around. As he says, “Inversion of control is really just a pretentious way of saying ‘Taking an argument.’”

It’s quality stuff.

You can find the talk here on youtube.