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

Go always had generics, map, slice, chan are all generic. Go just didn't let the user write any generics, so fuck you if you want any other data structure until 1.18.

If you really think you don't need generics, take your code code and replace every

  []int{}, []string{}, map[string]string{}
with

  []interface{}{}, map[interface{}]interface{}{}
and see how much you "don't need generics"


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

Search: