• Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    Go
  • License
    BSD 2-Clause "Sim...
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿงช A chunk of experiments and demos about Go 2 generics design (type parameter & type set)

go2generics

A chunk of demos for Go generics design (based on type parameters and type sets).

Standard Package

Package constraints

See the official implementation here.

Package slices

See the official implementation here.

Package maps

See the official implementation here.

Package container/set

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.

Others (under discussion)

Further Examples

See folders in this repository.

Known Issues

References

Here are some documents to get familiar with the spirit of generics:

Licnese

BSD-2-Clause

Copyright ยฉ 2020-2021 Changkun Ou

More Repositories

1

go-questions

๐Ÿ“– Go ็จ‹ๅบๅ‘˜้ข่ฏ•็ฌ”่ฏ•ๅฎๅ…ธ | ไปŽ้—ฎ้ข˜ๅˆ‡ๅ…ฅ๏ผŒไธฒ่ฟž Go ่ฏญ่จ€็›ธๅ…ณ็š„ๆ‰€ๆœ‰็Ÿฅ่ฏ†๏ผŒ่žไผš่ดฏ้€šใ€‚ https://golang.design/go-questions
Go
5,813
star
2

under-the-hood

๐Ÿ“š Go: Under The Hood | Go ่ฏญ่จ€ๅŽŸๆœฌ | https://golang.design/under-the-hood
Go
4,301
star
3

history

๐Ÿ“ Go: A Documentary | https://golang.design/history
Go
1,059
star
4

clipboard

๐Ÿ“‹ cross-platform clipboard package that supports accessing text and image in Go (macOS/Linux/Windows/Android/iOS)
Go
574
star
5

hotkey

โŒจ๏ธ cross-platform hotkey package
Go
202
star
6

lockfree

โšก๏ธ lock-free utilities in Go
Go
144
star
7

tgstore

An encrypted object storage system with unlimited space backed by Telegram.
Go
96
star
8

code2img

๐Ÿ–จ๏ธ A carbon-now API wrapper and iOS Shortcut
Go
79
star
9

ssaplayground

๐Ÿƒ The Go SSA Playground: Exploring SSA IR | https://golang.design/gossa
Go
76
star
10

bench

โฑ๏ธ Reliable performance measurement for Go programs. All in one design.
Go
38
star
11

chann

a unified channel package for buffered, unbuffered, and unbounded channels
Go
37
star
12

mainthread

๐Ÿ”€ schedule functions on the main thread
Go
33
star
13

redir

๐Ÿงญ a request redirector
Go
28
star
14

mkill

โ˜ ๏ธ mkill limits the number of threads in a Go program, without crashing it.
Go
23
star
15

thread

๐Ÿงต thead facilities in Go
Go
15
star
16

research

๐Ÿ—ž๏ธ (Possibly) Naรฏve thoughts regarding Go.
Go
12
star
17

reflect

Package reflect implements the proposal https://go.dev/issue/51520.
Go
5
star
18

verbose

๐Ÿคช verbose repository for testing purpose | go get golang.design/x/verbose
Go
4
star
19

.github

Community health files for the @golang-design organization
3
star
20

iter

Iterator utils.
Go
2
star
21

website

๐ŸŒ website | https://golang.design
HTML
1
star
22

io

a replacement to the standard io package.
Go
1
star