A chunk of demos for Go generics design (based on type parameters and type sets).
See the official implementation here.
See the official implementation here.
See the official implementation here.
This package is from the following discussions:
- golang/go#47331 proposal: container/set: new package to provide a generic set type (discussion)
See a possible implementation here.
- golang/go#47657 proposal: sync, sync/atomic: add PoolOf, MapOf, ValueOf
- golang/go#47632 proposal: container/heap: add Heap, a heap backed by a slice
- golang/go#47619 proposal: generic functions in the sort package
See folders in this repository.
- https://go.dev/issue/45639
- https://go.dev/issue/51338
- sync/*
- notsupport/*
Here are some documents to get familiar with the spirit of generics:
- Changkun Ou. A Summary of Go Generics Research 2020.08. Last Updates: 2021.08.
- Changkun Ou. Go 2 Generics: Type Parameters. https://changkun.de/s/go2generics/.
BSD-2-Clause
Copyright © 2020-2021 Changkun Ou