Welterweight Go: Boxing, Structural Subtyping, and Generics

Go’s unique combination of structural subtyping between generics and types with non-uniform runtime representations presents significant challenges for formalising the language. We introduce WG (Welterweight Go), a core model of Go that captures key features excluded by prior work, including underlying types, type constraints and type sets, and proposed new features, such as generic methods. We also develop LWG, a lower-level language that models Go’s runtime mechanisms, notably the distinction between raw struct values and interface values that carry runtime type information (RTTI). We give a type-directed compilation from WG to LWG that demonstrates how the proposed features can be implemented while observing important design and implementation goals for Go: compatibility with separate compilation, and no runtime code generation. Unlike existing approaches based on static monomorphisation, our compilation strategy uses runtime type conversions and adaptor methods to handle the complex interactions between structural subtyping, generics, and Go’s runtime infrastructure.

Authors

Institutions

Publication Details

Journal
Proceedings of the ACM on Programming Languages
Published
2026-01-08
DOI
https://doi.org/10.1145/3776721
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Welterweight Go: Boxing, Structural Subtyping, and Generics

Keith H. Randall, Robert Griesemer, Raymond Hu, Bernardo Toninho et al.
Proceedings of the ACM on Programming Languages
Logic, programming, and type systems
article

Welterweight Go: Boxing, Structural Subtyping, and Generics

Keith H. Randall, Robert Griesemer, Raymond Hu, Bernardo Toninho, Julien Lange, Philip Wadler
article en

Abstract

Go’s unique combination of structural subtyping between generics and types with non-uniform runtime representations presents significant challenges for formalising the language. We introduce WG (Welterweight Go), a core model of Go that captures key features excluded by prior work, including underlying types, type constraints and type sets, and proposed new features, such as generic methods. We also develop LWG, a lower-level language that models Go’s runtime mechanisms, notably the distinction between raw struct values and interface values that carry runtime type information (RTTI). We give a type-directed compilation from WG to LWG that demonstrates how the proposed features can be implemented while observing important design and implementation goals for Go: compatibility with separate compilation, and no runtime code generation. Unlike existing approaches based on static monomorphisation, our compilation strategy uses runtime type conversions and adaptor methods to handle the complex interactions between structural subtyping, generics, and Go’s runtime infrastructure.

Proceedings of the ACM on Programming LanguagesVol. 10(POPL)
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento (PT), Google (United States) (US), University of Lisbon (PT), Queen Mary University of London (GB), Royal Holloway University of London (GB), University of Edinburgh (GB)
Industry, innovation and infrastructure
Openalex Percentile: Top 93%
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Welterweight Go: Boxing, Structural Subtyping, and Generics — Keith H. Randall, Robert Griesemer, et al. · Proceedings of the ACM on Programming Languages (2026) | TGRS Research Map | TGRS