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

I look forward to generics in Go. Yes, it's possible to do it with reflection, interfaces and interface{}, but it's not typesafe, it's not fast, and it's prone to code bloat.

I'm a fairly late-comer to generics, I never programmed seriously in C++, I avoided generics in Java initially, and I wrote a lot of code in less statically-typed languages. Ever since the first serious talk of generics in Go 2.0 I've endeavored to educate myself and I now am very strongly in favor of them.



generics in go will be a great addition, also it is important to realize generics in java and go are different such that go uses structural typing vs nominal


Yup, and they are different from generics/templates in C++ as well.




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

Search: