Scala"s type system is extremely powerful (actually, it"s Turing complete). By understanding the tight interplay between implicit conversions and the type system, we can write very concise, yet generic and powerful code.
For example, while in Java collecting all int values from both Map[String,List[Integer]] and Map[String,Map[String,Integer]] (had to modify angular brackets due to YouTube limits -ed) requires two separate functions or reflection based code which isn"t type safe, in Scala it is quite easy to write a single piece of type safe code to accomplish this for arbitrary nestings of Map and List.
In this talk we will show how to write Scala code able to leverage the information given by the type signatures, both for better APIs and for writing less code.
A talk given at Scalapeño 2013 by Ofer Ron, graciously hosted at Google"s Campus Tel-Aviv.