News for hackers. Stuff that matters.
Re:Go generics may use square brackets [] not parenthesis () by meditative on Tuesday July 14, 2020 @11:16PM (#23840828)
> how do core data structures like hash maps work without generics

blessed implementations inside the language, slices, maps and channels are built in generics.

sync.Map is what the standard library version looks like. It loses type safety.

https://golang.org/pkg/sync/#Map

Re:Go generics may use square brackets [] not parenthesis () by echlebek on Wednesday July 15, 2020 @02:32AM (#23842018)
I'm looking forward to seeing these types of libraries improve with generics. It's notably more work to use these data structures, even if they are used rarely.