Golang proposal: container/: generic collection types
Summary
This article discusses a proposal to add generic collection types to Go's container package, expanding the standard library's capabilities with generics.
View Cached Full Text
Cached at: 07/31/26, 07:59 PM
golang/go
Source: https://github.com/golang/go
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.
Similar Articles
Generic Methods in Go 1.27
Go 1.27 adds generic methods, allowing methods to define their own type parameters without modifying the receiving struct, addressing a limitation from Go 1.18 while excluding interfaces due to runtime constraints.
GC shape stenciling in Go generics
An in-depth explanation of how the Go compiler implements generics using GC shape stenciling, comparing it to Rust's full monomorphization and Java's type erasure.
Go 1.27 Release Notes
Go 1.27 release introduces generic methods and other language and toolchain updates while maintaining compatibility with previous versions.
Type Safe Generic Data Structures in C
A technical blog post exploring techniques for writing type-safe generic data structures in C, progressing from header-inclusion macros and void pointers to unions and inline storage, illustrated with a linked list implementation.
Composite objects and C++26 the std::polymorphic type
A Lobste.rs discussion of composite objects and the proposed std::polymorphic type coming in the C++26 standard, exploring how it enables type-erased polymorphism without inheritance.