Type Inference from Scratch: A Workshop with Christoph Hegemann

Опубликовано: 11 Октябрь 2024
на канале: Berlin Functional Programming Group
1,595
52

Type checking and type inference in particular are often perceived as super-advanced topics, only reserved for specialists, witches, and wizards. In this workshop, Christoph Hegemann will show you that none of that is true, and type checking can be understood by everyone from first principles. To do so, we'll implement a type checker (with inference) for a small functional programming language in Kotlin. After familiarizing ourselves with our language for a few minutes, we'll dive right into the coding and alternate between mob and pair programming.

Prerequisites:

Clone this repo: https://github.com/kritzcreek/infer_w...
You should also install IntelliJ Idea (the free community edition works just fine). We'll be using a small, mostly functional subset of Kotlin.
If you've never written any Kotlin, it might be a good idea to work through the Introduction, Conventions, and Collections chapters in the Kotlin Koans (https://play.kotlinlang.org/koans/ove.... The other main feature we'll make use of is "Sealed Classes" https://kotlinlang.org/docs/reference... (Basically ADTs). We'll learn how to work with these, but if you're curious you are encouraged to play around with them a bit on your own.

Christoph enjoys working on compilers and type systems, and he built the IDE integration for the PureScript programming language. He's currently working at DFINITY on the compiler for the Motoko programming language. His other passion is teaching others about these topics by giving courses, talks, and workshops. His thesis added Type Directed Search to the PureScript compiler, which has since been adopted and integrated into the Glorious Haskell Compiler.

Further reading: https://github.com/kritzcreek/infer_w...

This virtual talk was brought to you by the Berlin Functional Programming Group.
Join us on Meetup: https://www.meetup.com/Berlin-Functio...
Follow us on Twitter:   / berlinfpgroup  
Buy a T-shirt: https://teespring.com/berlin-fp-group
Support us on Patreon:   / bfpg