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

Why? Like, I might have weird taste, because I really liked generics and even Java-style checked exceptions :-) And to me, generics always sounded like the most practical way to do safe code-reuse across various types.


They add complexity which makes understanding and auditing code much harder. Look at OpenSSL and their overuse of macros, or heavily-templated C++ code.


No one is asking for C/C++ style macros, or even C++ templates. Go generics would be closer to Java or C# generics, which increase code clarity, reduce boilerplate and copy/paste code, and communicate intent.


I see. If it can be implemented as something that make code easier to read and not worse. Why not. But I’d need to see a clear example of that.


Fair. In my opinion generics are good alternative to macros or templates, because they are much more constrained.




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

Search: