Golang Set Data Structure Question
Does golang have the plan for supporting set datastructure? This feature can be implemented with 'map'. countrySet := map[string]bool{ "US": true, "JP": true, "KR": true, } But to ease the eyes of readers, 'set' is a necessary data structure. countrySet := set[string]{"US", "JP", "KR"} Does golang have the plan for supporting syntax like this? dictionary go set No, Go will never support this, as it doesn't make sense. There's no way to know what the value should be without providing it. But in future, if you want to know what's planned for Go, or suggest your own ideas, just visit the Go issue tracker.
A screenshot of a Stack Overflow question about whether Go will support a native set data structure. The joke is that the proposed syntax is presented as obvious and helpful, but the answer dismisses it as nonsensical because Go requires explicit values, poking fun at feature requests and Go's design philosophy. EN: A screenshot of a Stack Overflow question about whether Go will support a native set data structure. The joke is that the proposed syntax is presented as obvious and helpful, but the answer dismisses it as nonsensical because Go requires explicit values, poking fun at feature requests and Go's design philosophy.
Stack Overflow webpage / веб-страница Stack Overflowprogramming code / программный кодcode block / блок кодаquestion title / заголовок вопросаanswer text / текст ответаupvote and downvote buttons / кнопки голосованияGo programming language / язык программирования Gomap data structure / структура данных mapset data structure / структура данных setcountry codes / коды странcomputer screenshot / скриншот компьютераissue tracker link / ссылка на трекер задач
- @gentoomemes / 16050 2025-02-17
- Template
- Stack Overflow screenshot
- Type
- image
- Size
- 800×700 · 74.5 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added