go2generics

module
v0.0.2-0...-11de152 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2022 License: BSD-2-Clause

README

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

Directories

Path Synopsis
Package errors offers try/catch/final primitives for error handling
Package errors offers try/catch/final primitives for error handling
Package maps implements simple functions to manipulate maps in various ways.
Package maps implements simple functions to manipulate maps in various ways.
Package metrics provides a general mechanism for accumulating metrics of different values.
Package metrics provides a general mechanism for accumulating metrics of different values.
Package ring implements operations on generic circular lists.
Package ring implements operations on generic circular lists.
std
constraints
Package constraints defines a set of useful constraints to be used with type parameters.
Package constraints defines a set of useful constraints to be used with type parameters.
container/set
Package set defines a Set type that holds a set of elements.
Package set defines a Set type that holds a set of elements.
maps
Package maps defines various functions useful with maps of any type.
Package maps defines various functions useful with maps of any type.
slices
Package slices defines various functions useful with slices of any type.
Package slices defines various functions useful with slices of any type.
talk118
sum

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL