
Alejandro Serrano Mena
Researcher / JetBrains
Understanding typing and resolution
A birds-eye overview of how Kotlin figures out which overloads to call and how types align — from scoping rules to lambdas and context-sensitive resolution.
Kotlin gives developers a lot of freedom in creating different overloads and working with several scopes. However, this is also a source of complexity. This talk gives a birds-eye overview of how the process of resolution (figuring out which overloads of many to call) and typing (understanding that all the types in a program align) work.
Among others, this talk discusses:
- The general process of resolution in Kotlin
- How scoping affects resolution
- Rules to choose overloads when several apply
- The special case for lambdas, including PCLA (the “new” builder inference)
- Support for context-sensitive resolution
Alejandro Serrano Mena is a passionate advocate of programming language design, formal methods and functional programming in software development. He works as a researcher in the Kotlin Language Evolution team at JetBrains and helps co-maintain the Arrow library. He enjoys not only using and improving those tools, but also spreading the word: he’s written four books targeting different levels, and regularly gives talks at conferences and meetups.
For quite some time Alejandro was an academic, working in the area of compilers and type systems for functional languages. His PhD thesis focused on error messages, and he’s been involved in efforts like improving GHC’s support for impredicativity. This knowledge is put into practice in several open source projects, many of them using metaprogramming techniques or compiler extensions.
