REVIEW 2 major objections 2 minor 22 references
Welterweight Go: Boxing, Structural Subtyping, and Generics (Extended Version)
T0 review · 2 major / 2 minor · reviewed 2026-06-26 · grok-4.3
Pith's one-line read A type-directed compilation from Welterweight Go to LWG implements generics and structural subtyping using runtime conversions and adaptor methods while preserving separate compilation.
desk verdict WG and LWG give a core model for Go generics plus structural subtyping, compiled via runtime conversions and adaptors to keep separate compilation and avoid code generation. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The type-directed compilation from WG to LWG that employs runtime type conversions and adaptor methods to manage structural subtyping and generics.
What would settle it
A concrete program using generic methods on types with underlying types where the LWG execution does not match the WG semantics or requires generating new code at runtime.
Extended reading notes
Core claim
WG models key Go features including underlying types, type unions and type sets, and generic methods. LWG models the runtime mechanisms distinguishing raw structs from interfaces with RTTI. The type-directed compilation from WG to LWG uses runtime type conversions and adaptor methods to implement the features while ensuring separate compilation and no runtime code generation.
Load-bearing premise
WG correctly models the main Go features not covered before, and the compilation to LWG accurately captures the runtime difference between plain struct values and typed interface values while keeping the same meaning.
Editorial extensions
If this is right
- The compilation strategy demonstrates that proposed Go features can be implemented without runtime code generation.
- It shows compatibility with separate compilation for programs using generics and structural subtyping.
- The use of runtime conversions and adaptors avoids the limitations of static monomorphisation in handling Go's runtime infrastructure.
- Semantics are preserved between the high-level model and the runtime model.
Reading between the lines
- If the compilation preserves semantics, it could guide implementations of similar features in other languages with structural subtyping and generics.
- Testable by checking if the compiled LWG code matches the behavior of actual Go programs with generic methods and type sets.
- The approach might extend to other runtime distinctions in languages like interfaces versus concrete types.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces WG, a core calculus modeling Go that incorporates structural subtyping, generics, underlying types, type unions/type sets, and generic methods (features excluded from prior formalizations). It defines LWG as a lower-level language capturing Go runtime distinctions between raw struct values and interface values carrying RTTI. A type-directed compilation from WG to LWG is presented that employs runtime type conversions and adaptor methods to realize the features while maintaining separate compilation and avoiding runtime code generation, in contrast to static monomorphisation approaches.
Significance. If the compilation strategy is shown to preserve the necessary properties, the work would supply a formal account of Go-specific challenges at the intersection of structural subtyping and generics, together with a practical compilation technique aligned with Go's implementation constraints. The explicit modeling of runtime boxing and RTTI distinctions, plus the emphasis on separate compilation, distinguishes the contribution from monomorphisation-based formalisms.
major comments (2)
- [Abstract / compilation sections] Abstract and compilation development: the central claim is that the type-directed compilation from WG to LWG correctly implements the features while preserving semantics and design goals, yet the manuscript supplies no theorems, lemmas, or proof sketches establishing type preservation, semantic equivalence, or that the runtime conversions and adaptor methods handle all interactions between structural subtyping, generics, and Go's runtime infrastructure.
- [WG and LWG definitions] The assumption that WG faithfully captures the excluded Go features (underlying types, type unions/sets, generic methods) and that the LWG model accurately reflects the runtime distinction between raw structs and RTTI-carrying interfaces is load-bearing for the compilation claim, but no validation (e.g., via examples, metatheory, or comparison to Go implementation) is provided to confirm this modeling choice.
minor comments (2)
- [WG syntax] Notation for type sets and unions could be clarified with a small example table showing how they interact with structural subtyping.
- [LWG runtime model] The distinction between 'raw struct values' and 'interface values' in LWG would benefit from an explicit side-by-side comparison figure.
Simulated Author's Rebuttal
We thank the referee for the careful reading and constructive comments. The two major points correctly identify areas where the manuscript is currently thin on formal justification and validation. We address each below and indicate how we will revise.
read point-by-point responses
-
Referee: [Abstract / compilation sections] Abstract and compilation development: the central claim is that the type-directed compilation from WG to LWG correctly implements the features while preserving semantics and design goals, yet the manuscript supplies no theorems, lemmas, or proof sketches establishing type preservation, semantic equivalence, or that the runtime conversions and adaptor methods handle all interactions between structural subtyping, generics, and Go's runtime infrastructure.
Authors: We agree that the manuscript presents the compilation rules and argues for their correctness via examples and informal reasoning but does not supply theorems, lemmas, or proof sketches for type preservation or semantic equivalence. This is a genuine gap. In the revised version we will add a dedicated metatheory section containing (i) a statement of type preservation for the compilation, (ii) a sketch of the key lemmas relating WG and LWG reductions, and (iii) a brief argument that the adaptor-method technique preserves the required structural-subtyping and generic-method interactions. We will also make explicit which properties are proved and which remain conjectural. revision: yes
-
Referee: [WG and LWG definitions] The assumption that WG faithfully captures the excluded Go features (underlying types, type unions/sets, generic methods) and that the LWG model accurately reflects the runtime distinction between raw structs and RTTI-carrying interfaces is load-bearing for the compilation claim, but no validation (e.g., via examples, metatheory, or comparison to Go implementation) is provided to confirm this modeling choice.
Authors: The modeling decisions are grounded in the Go language specification and the published implementation of the runtime and compiler, but the manuscript indeed provides only illustrative examples rather than systematic validation or direct comparison with the Go toolchain. We will expand the revised paper with (a) a table mapping each WG construct to the corresponding Go feature or proposal, (b) additional worked examples that exercise underlying types, type sets, and generic methods, and (c) a short discussion of how the LWG boxing rules align with the concrete representation choices described in the Go runtime source. Full mechanized correspondence with the production compiler is beyond the scope of this work, but the added material will make the modeling assumptions more transparent and checkable. revision: yes
Circularity Check
No significant circularity; definitional model and compilation strategy
full rationale
The paper defines WG as a core calculus capturing Go features (underlying types, type unions/sets, generic methods) and LWG as a lower-level model of runtime boxing/RTTI. It then defines a type-directed compilation from WG to LWG. This is a constructive, by-definition translation whose correctness is established relative to the authors' own semantics; it does not reduce any claimed result to a fitted parameter, a self-citation chain, or an input by construction. No predictions, uniqueness theorems, or ansatzes are invoked in a load-bearing way. The approach is offered as an alternative to monomorphisation while preserving separate compilation, which is an independent design goal external to the formalisation itself. This is the normal, non-circular outcome for a language-design and compilation paper.
Assumptions & free parameters
Cite this review
Pith. "Pith review of Welterweight Go: Boxing, Structural Subtyping, and Generics (Extended Version)." pith.science (2026). https://pith.science/paper/HCO7H6QS
@misc{pith2026260627138,
author = {Pith},
title = {Pith review of: Welterweight Go: Boxing, Structural Subtyping, and Generics (Extended Version)},
year = {2026},
howpublished = {\url{https://pith.science/paper/HCO7H6QS}},
note = {Machine review of arXiv:2606.27138}
}
read the original 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 unions 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.
Figures
Figures from the paper (24 more)
Reference graph
Works this paper leans on
-
[1]
Type soundness proofs with definitional interpreters. InProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017, Giuseppe Castagna and Andrew D. Gordon (Eds.). ACM, 666–679. doi:10.1145/3009837.3009866 Nada Amin and Ross Tate
-
[2]
InProceedings of the 1998 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA ’98), Vancouver, British Columbia, Canada, October 18-22,
Making the Future Safe for the Past: Adding Genericity to the Java Programming Language. InProceedings of the 1998 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA ’98), Vancouver, British Columbia, Canada, October 18-22,
1998
-
[3]
doi:10.1145/286936.286957 Karl Crary, Stephanie Weirich, and J
ACM, 183–200. doi:10.1145/286936.286957 Karl Crary, Stephanie Weirich, and J. Gregory Morrisett
-
[4]
Intensional Polymorphism in Type-Erasure Semantics. InProceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP ’98), Baltimore, Maryland, USA, September 27-29, 1998.ACM, 301–312. doi:10.1145/289423.289459 dominikh
-
[5]
Generic Go to Go: dictionary-passing, monomorphisation, and hybrid.Proc. ACM Program. Lang.6, OOPSLA2 (2022), 1207–1235. doi:10.1145/3563331 Robert Griesemer, Raymond Hu, Wen Kokke, Julien Lange, Ian Lance Taylor, Bernardo Toninho, Philip Wadler, and Nobuko Yoshida
-
[6]
Featherweight go.Proc. ACM Program. Lang.4, OOPSLA (2020), 149:1–149:29. doi:10.1145/3428217 Robert Griesemer and Ian Lance Taylor
-
[7]
InProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20,
Java generics are turing complete. InProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20,
2017
-
[8]
doi:10.1145/3009837 Robert Harper and J
ACM, 73–85. doi:10.1145/3009837 Robert Harper and J. Gregory Morrisett
Show all 22 references
-
[9]
doi:10.1145/199448.199475 Raymond Hu, Julien Lange, Bernardo Toninho, Philip Wadler, Robert Griesemer, and Keith Randall
ACM Press, 130–141. doi:10.1145/199448.199475 Raymond Hu, Julien Lange, Bernardo Toninho, Philip Wadler, Robert Griesemer, and Keith Randall
-
[10]
Welterweight Go: Boxing, Structural Subtyping and Generics (Artifact). Zenodo. doi:10.5281/zenodo.17741038 Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler
-
[11]
ACM Trans
Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst.23, 3 (2001), 396–450. doi:10.1145/503502.503505 Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer
2001 doi
-
[12]
ACM Program
RustBelt: securing the foundations of the rust programming language.Proc. ACM Program. Lang.2, POPL (2018), 66:1–66:34. doi:10.1145/3158154 Andrew Kennedy and Don Syme
2018 doi
-
[13]
In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Snowbird, Utah, USA, June 20-22,
Design and Implementation of Generics for the .NET Common Language Runtime. In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Snowbird, Utah, USA, June 20-22,
2001
- [14]
-
[15]
doi:10.1145/143165.143205 Mario Macías
ACM Press, 177–188. doi:10.1145/143165.143205 Mario Macías
-
[16]
InProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Portland, OR, USA, June 15-17, 2015, David Grove and Stephen M
KJS: a complete formal semantics of JavaScript. InProceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Portland, OR, USA, June 15-17, 2015, David Grove and Stephen M. Blackburn (Eds.). ACM, 346–356. doi:10.1145/2737924.2737991 Keith Randall
2015 doi
-
[17]
A type-directed, dictionary-passing translation of method overloading and structural subtyping in Featherweight Generic Go.J. Funct. Program.33 (2023). doi:10.1017/S0956796823000047 Ian Lance Taylor and Robert Griesemer
2023 doi
-
[18]
https://blog.rust-lang.org/2015/05/11/traits.html Raymond Hu, Julien Lange, Bernardo Toninho, Philip Wadler, Robert Griesemer, and Keith Randall Mirko Viroli and Antonio Natali
Abstraction without overhead: traits in Rust. https://blog.rust-lang.org/2015/05/11/traits.html Raymond Hu, Julien Lange, Bernardo Toninho, Philip Wadler, Robert Griesemer, and Keith Randall Mirko Viroli and Antonio Natali
2015
-
[19]
Parametric polymorphism in Java: an approach to translation based on reflective features. InProceedings of the 2000 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA 2000), Minneapolis, Minnesota, USA, October 15-19, 2000.ACM, 146–...
2000 doi
-
[20]
In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2004, Venice, Italy, January 14-16,
Formalization of generics for the .NET common language runtime. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2004, Venice, Italy, January 14-16,
2004
-
[21]
doi:10.1145/964001.964005 7 Examples 7.1 Desugared version of Fig
ACM, 39–51. doi:10.1145/964001.964005 7 Examples 7.1 Desugared version of Fig. 1 packagemain typeMyNuminterface{ MyInt | MyFloat } typeMyIntint func(x MyInt) String()string{returnstrconv.Itoa(int(x)) } typeMyFloatfloat64 func(x MyFloat) String()string{returnstrconv.FormatFloat...
-
[22]
methods(𝑆)=methods(𝑇 ′)andtypes(𝑆)=types(𝑇 ′)therefore 𝑇< : 𝑆and so𝑇≺:𝑆
WG: additional typing rules for expressions Follows by transitivity of<: No other possible derivation of≺: Case:𝑇< : 𝑇and¬iface(𝑇) Immediate since𝑇=𝑇 ′ Case:𝑇< : 𝑇 ′ fromiface(𝑇 ′),types(𝑇) ⊆types(𝑇 ′),methods(𝑇) ⊇methods(𝑇 ′),¬tyvar(𝑇 ′) Subcase:𝑇 ′ ≺:𝑆from𝑇< : 𝑆 Follows by t...
2020
Reviewed June 26, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.