
However, Scala methods support a rich set of features that are not expressible with the traditional FunctionN classes: they can have type parameters, dependent parameters, contextual parameters, etc. Thankfully, most of these limitations have now been lifted in Scala 3, in each case the trick was to find a type to abstract over these functions.1 2 3
In this talk we will take a deep dive into polymorphic function types which let us define functions with type parameters.
We will show how to use them, what they’re good for, how they interact with other language features and how they’re implemented.
We will also discuss recent improvements made in the compiler to make them more pleasant to use, and possible future improvements.
1.
2.
3.