Go’s standard library currently lacks built-in support for some fundamental data structures, which are frequently needed in various programming scenarios. Developers often resort to implementing these themselves or using third-party packages. Having built-in, well-tested, and optimized implementations would save time and reduce errors.

Proposal: Add the following data structures to the Go standard library - https://github.com/idsulik/go-collections (I've created a separate package, but I think at least Set, Queue, and Stack should be included in Go)

Comment From: gabyhelp

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: idsulik

So the proposal was declined because of this https://github.com/golang/go/issues/7088#issuecomment-351535780 ? For me it sounds like "we have a fixed size array and this is why we don't need a slice, because developers can write their own abstractions", the Set/Queue/Stack are standard data structures and other languages like Java, PHP, Python have these abstractions to make developers life easier, because you don't need invent them again and again

Comment From: seankhliao

This seems too broad to be reviewed as a single proposal, see also #47331 and #48287