Abstract
What type would you set for a variable that can be either an int or a float64? In this talk I will talk about the empty interface in Go. We will look into why we need the empty interface type and how it is used. One common (mis)usage of the empty interface is to implement sum types (a variable that have multiple possible types, for example, a variable that is either an int or a float64). I will describe an approach for implementing sum types in Go without the empty interface! And finally, I will demo Intertype, which is an experimental type checker for annotated empty interfaces. I will show how we could add type constraints for the dynamic types of an empty interface in our own code and for our dependencies.