Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 7.38 KB

generics.md

File metadata and controls

81 lines (59 loc) · 7.38 KB

A Summary of Go Generics Research

Last updates: Aug 2021

Author: Changkun Ou

This document summarizes a personal research on a selected list of references and relevant discussions regarding the Go generics.

Research Paper

Research is leading the world. Many good ideas are done by researchers. One must read papers for digging the intrinsic properties of the generics design problem.

Go Proposals

C++ Proposals

The proposals can be found in C++ Standards Committee Papers: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/. Most of the proposals are done by Bjarne Stroustrup and can be found in http://www.stroustrup.com/WG21.html.

  • [Stroustrup 1994] Stroustrup, Bjarne. The design and evolution of C++. Pearson Education India, 1994.
    • In this book, Bjarne discussed the decision of the origin template design.

C++ is also considered contracts but different than Go's contract design. Contracts are intended to communicate constraints on the values of runtime objects, with the parameters to a function being the most common case. A contract violation is always a bad thing, and the program exhibits undefined behavior.

Articles

Code base

There are some code base (not all) that is good for generics design:

Quotes

  • Fancy algorithms are slow when n is small, and n is usually small. - Rob Pike

Licnese

BSD-2-Clause

Copyright © 2020-2021 Changkun Ou