| Actually not that much, I remember 2 very different proposals, including this one. The previous one was confusing as F and the antithesis of the simplicity Go claims it abides by. It felt very much like a plot to add generics without ever using the word generics anywhere and looking too much like Java/C#/... The current proposal is basically what you'd expect from generics in a programming language, but a bit more limited. It took basically 10 years, a generation of developers, to quell the opposition against generics in Go, to end up with generics... They might even have unknowingly followed the ADA implementation except that Go's type inference makes them even easier to use. > To use a generic type, you must supply type arguments. This is called instantiation. https://go.googlesource.com/proposal/+/refs/heads/master/des... This is basically how generics as packages in ADA works. I would add that ADA solved many existing problems in Go decades ago... https://en.wikibooks.org/wiki/Ada_Programming/Generics > The generic procedure can be instantiated for all the needed types. Now all Go needs to do is to look at how Ada tasks work in order to fix every single issue with Go routines... |