Go 1.27 adds generic methods but bans them from interfaces, sparking debate
Go 1.27, released on August 19, 2026, introduced generic methods for concrete types such as structs, reversing a decade-long stance that the language would never support them. However, the release explicitly prohibits interfaces from declaring or implementing generic methods, a restriction that has frustrated many developers. The limitation stems from a fundamental runtime constraint: the compiler cannot determine at compile time which instantiations of a generic method will be needed, making dynamic dispatch incompatible with the feature. Go co-designer Robert Griesemer, who filed the original proposal in January 2026, argued that generic methods on concrete types are valuable on their own merits, independent of interface support. Critics acknowledge the pain point is real, but proponents argue the restriction is an honest engineering decision that prevents deeper breakage in type inference, reflection, and runtime behavior.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in