3 ms·
Similarly, the same thing happened in C#. Where Go and C# have differed is where generics are common. In the introduction of generics into C#/.NET, their use w
by indrora 4y ago
Similarly, the same thing happened in C#.
Where Go and C# have differed is where generics are common. In the introduction of generics into C#/.NET, their use was added everywhere. Microsoft made a huge point of including built-in List<T> and ArrayList<T> and other common things that would benefit from generics.
Go however has drawn the line in the sand that generics are not allowed into the standard library for now. Rob Pike has been vocal about this [1] and I can almost agree with him.
Part of the issue is that the way Go handles the standard library. Part of the issue is how libraries in general are managed.
* Go’s standard library is simultaneously “just a git repo in the ether” and “A thing shipped with the Go compiler runtime”. Like any other library.
* Libraries in general being “Just another git repo”, many haven’t been updated to use Go modules. Because Go doesn’t have a good central repository for go libraries, I don’t have good numbers on this.
[1] https://github.com/golang/go/issues/48918 https://github.com/golang/go/issues/48918
- Jtsummers 4y agoC# also adopted generics earlier in its life. 2.0 was released in 2005 and added generics, the language was first released, announced?, in 2000. It was also around the same time as Java added generics.