Go is a systems programming language designed and developed by Google for large scale, production-ready development. The Go language, while being a strongly typed language, (in)famously lacks any form of generics or type abstraction. In this talk we describe a design for generics in Go inspired by previous work on Featherweight Java by Igarashi, Pierce, and Wadler. Our design forms the theoretical basis for approved language change proposal that adds generics to the Go language. Whereas subtyping in a language such as Java is nominal, in Go it is structural, and whereas generics in Java are defined via erasure, in Go we use monomorphisation. Although monomorphisation is used widely, we are one of the first to formalise it. In the talk I will also mention ongoing work on an alternative compilation strategy for generics that leverages runtime type information already present in the current Go compilation pipeline.
Bernardo Toninho is an Assistant Professor at NOVA School of Science and Technology, and a researcher at NOVA LINCS, Portugal. Bernardo’s research focuses on the use of programming language and type system-based approaches to ensure safe and correct software, with an emphasis on type theories for concurrency that are able to provide strong correctness guarantees at compile-time. Bernardo is involved in the joint NOVA LINCS, INESC and OutSystems GOLEM project and is involved in the design of the theoretical foundations of the Go programming languages with Google’s Go team. Bernardo was a postdoctoral researcher at Imperial College London in Nobuko Yoshida’s Mobility Reading Group and holds a dual PhD in Computer Science by Carnegie Mellon University and NOVA University of Lisbon.