4 ms·
Mine would be a much larger collections library. Having come to go from Java and finding that the standard go library has no trees, no stack, no skip list, etc.
by ternaryoperator 5y ago
Mine would be a much larger collections library. Having come to go from Java and finding that the standard go library has no trees, no stack, no skip list, etc. was quite a surprise. Possibly the advent of generics will stimulate development of a more robust standard collections library.
- christophilus 5y agoIt does have a doubly-linked list which can easily serve as a stack, though. And it has a heap which is a poor man's replacement for some uses of tree. I've found that I can get quite a bit farther with the built-in Go slices, maps, and lists than I thought. But yeah. Now that generics are in, I do hope they add a handful of common collections. [0] https://pkg.go.dev/container/list@go1.17.6 https://pkg.go.dev/container/list@go1.17.6 [1] https://pkg.go.dev/container/heap@go1.17.6 https://pkg.go.dev/container/heap@go1.17.6 [2] https://pkg.go.dev/container/ring@go1.17.6 https://pkg.go.dev/container/ring@go1.17.6