Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately, it seems to be lacking many useful data structures. This bites you hard once you hit the limitations of the built-ins.


Which data structures have you personally been bitten by that lack of?

I ask this because I often find myself thinking I would want such-and-such a feature in a tool, library, etc, but unless it was implemented in response to an immediate need, when I actually add it I realize it ends up unused.


I mostly wanted some better set and map container implementations (hashtables, binary search trees, tries); the built-in map can't be applied to all types, and is quite limited in how configurable it is. Given that we were going to be using these data structures everywhere, we decided Go was a bad choice for our project.

My guess is that better containers aren't in the library because of the lack of generics. I really hope the Go folks get around to adding generics soon; it's a beautiful language in most other respects. It would definitely be one of my first choices for a more systems-y project.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: