🔔 FOLLOW GOLAB CHANNEL 🔔
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.
This channel is dedicated to the videos of the GoLab conference.
💛 Follow us on TWITTER: / golab_conf
💜 Follow us on FACEBOOK: / golabconf
GoLab is the first Italian international conference on the Go programming language, organized by Develer.
Develer is not just an Italian company projecting and releasing hardware and software solutions for the industrial environment, but is also an ensemble of people sharing their great passion for new technologies and how they can be applied to your everyday life.
🔸 Follow DEVELER on INSTAGRAM: / wearedeveler
🔹 Follow DEVELER on FACEBOOK: / we.are.develer
🔸 Follow DEVELER on TWITTER: / develer
🔹 Follow DEVELER on LINKEDIN: / 114426
🔸 Follow DEVELER on TELEGRAM: https://t.me/wearedeveler
🔹 Follow DEVELER on TIK TOK: / wearedeveler