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

this. Interfaces do 90% of what generics are used for in other languages. The remaining 10% had been solved by boilerplate/generation. Yes, it will be nice to have a better answer for that 10%. But we'll probably end up with generics being used (badly) for 90% of cases instead.

As always in Go, follow the standard library. If they're hesitating to use generics, then that's solid advice.



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

Search: