Please log in to watch this conference skillscast.
Understanding type inference in Scala is often seen as a dark art. How does the compiler sometimes manage to conjure up exactly the correct type from an horrendous tangle of generic method calls, while at other times it draws a blank at something that seems plainly obvious to everyone else?
Jon will look at the variety of influences that guide Scala's type inference, why type ascriptions are sometimes required and sometimes not, and how you can design methods to maximize type inference at the call site.
At the end of the talk, Scala's type inference will probably remain somewhat mysterious, but you should be closer to understanding where it works, where it doesn't, and the things to try when you get stuck.
YOU MAY ALSO LIKE: