{"id":13614302,"url":"https://github.com/golang-design/go2generics","last_synced_at":"2025-04-16T01:09:22.755Z","repository":{"id":43508412,"uuid":"247027414","full_name":"golang-design/go2generics","owner":"golang-design","description":"🧪 A chunk of experiments and demos about Go 2 generics design (type parameter \u0026 type set)","archived":false,"fork":false,"pushed_at":"2022-04-01T07:55:03.000Z","size":250,"stargazers_count":150,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-16T01:09:08.961Z","etag":null,"topics":["generics","go","golang"],"latest_commit_sha":null,"homepage":"https://changkun.de/s/go2generics/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golang-design.png","metadata":{"files":{"readme":"README.md","changelog":"history/201006.go2.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-13T08:55:45.000Z","updated_at":"2025-01-07T03:01:43.000Z","dependencies_parsed_at":"2022-09-10T20:22:00.916Z","dependency_job_id":null,"html_url":"https://github.com/golang-design/go2generics","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Fgo2generics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Fgo2generics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Fgo2generics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-design%2Fgo2generics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang-design","download_url":"https://codeload.github.com/golang-design/go2generics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249178212,"owners_count":21225349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generics","go","golang"],"created_at":"2024-08-01T20:00:59.628Z","updated_at":"2025-04-16T01:09:22.719Z","avatar_url":"https://github.com/golang-design.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go2generics ![](https://changkun.de/urlstat?mode=github\u0026repo=golang-design/go2generics)\n\nA chunk of demos for Go generics design (based on type parameters and type sets).\n\n## Standard Package\n\n### Package `constraints`\n\nSee the official implementation [here](https://github.com/golang/exp/tree/master/constraints).\n\n### Package `slices`\n\nSee the official implementation [here](https://github.com/golang/exp/tree/master/slices).\n\n### Package `maps`\n\nSee the official implementation [here](https://github.com/golang/exp/tree/master/maps).\n\n### Package `container/set`\n\nThis package is from the following discussions:\n\n- [golang/go#47331](https://golang.org/issue/47331) proposal: container/set: new package to provide a generic set type (discussion)\n\nSee a possible implementation [here](./std/container/set).\n\n### Others (under discussion)\n\n- [golang/go#47657](https://golang.org/issue/47657) proposal: sync, sync/atomic: add PoolOf, MapOf, ValueOf\n- [golang/go#47632](https://golang.org/issue/47632) proposal: container/heap: add Heap, a heap backed by a slice\n- [golang/go#47619](https://golang.org/issue/47619) proposal: generic functions in the sort package\n\n## Further Examples\n\nSee folders in this repository.\n## Known Issues\n\n- https://go.dev/issue/45639\n- https://go.dev/issue/51338\n- sync/*\n- notsupport/*\n\n## References\n\nHere are some documents to get familiar with the spirit of generics:\n\n- Changkun Ou. [A Summary of Go Generics Research](./generics.md) 2020.08. Last Updates: 2021.08.\n- Changkun Ou. Go 2 Generics: Type Parameters. https://changkun.de/s/go2generics/.\n## Licnese\n\nBSD-2-Clause\n\nCopyright \u0026copy; 2020-2021 [Changkun Ou](https://changkun.de)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang-design%2Fgo2generics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang-design%2Fgo2generics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang-design%2Fgo2generics/lists"}