logoalt Hacker News

Golang proposal: container/: generic collection types

53 pointsby jabitstoday at 6:39 PM12 commentsview on HN

Comments

nasretdinovtoday at 8:40 PM

Well, better late than never. Stuff like sets or a typed heap is long overdue. Maybe they'll even add iterator API for database/sql results this decade too (something like my pull request for sqlx https://github.com/jmoiron/sqlx/pull/990 but maybe more polished)

show 1 reply
athoraxtoday at 8:12 PM

On one hand I'm glad to see this being added, but its becoming obvious building generics into the language as-is just isn't a good fit. Hopefully Go v2 can solve this at a more foundational level while still allowing interop or easy porting form current go code.

show 3 replies
troupotoday at 7:33 PM

Go is rediscovering Guy Steele's Growing a Language from first principles, at a much slower pace: https://youtu.be/_ahvzDzKdB0?is=qZdfiT3792XyHxSJ

show 3 replies