Go Wiki: Go 2 Generics Feedback

This page is meant to collect and organize feedback about the Go 2 contracts (generics) draft design.

A prototype implementation of the syntax can be found in https://go.dev/cl/149638 which may be patched on tip of the Go repo.

Please post feedback on your blog, Medium, GitHub Gists, mailing lists, Google Docs, etc. And then please link it here.

As the amount of feedback grows, please feel free to organize or reorganize this page by specific kind of feedback.

Supporting

Supplemental (supporting with modifications)

Counterproposals

Against

Adding Your Feedback

Please format all entries as below.

To make it easier to see new feedback. Please make a Gist. And also help to keep the list sorted in reverse-chronological order by including your new entry at the top of the category list.

Quick comments

type Key _
type Value _

type IntStringHolder Holder<Key:int, Value:string>

type Holder struct {
    K Key
    V Value
}

func (h *Holder) Set(k Key, v Value) {
    h.K = k
    h.V = v
}

func main() {
    v:= IntStringHolder{}
    v.Set(7,"Lucky")
}

This content is part of the Go Wiki.