4 ms·
I imagine the downvotes are because it doesn't really add anything insightful. It just looks like whining. Personally, I don't get the fuss. If you want generi
by growse 9y ago
I imagine the downvotes are because it doesn't really add anything insightful. It just looks like whining.
Personally, I don't get the fuss. If you want generics, go use Java/Kotlin/something else. I don't see anyone complaining about the lack of generics in C or brainfuck, what makes golang special?
- pjmlp 9y agoBecause C actually has better support than Go for generics. They could be faked with macros since the early days, which was what Borland's BIDS framework in Borland C++ 2.0 for MS-DOS made use of, dropped when version 3.0 with initial template support was released (around 1992). Additionally, C now has basic language support for generics in C11 with _Generic.
- growse 9y agoFair enough, my C knowledge is a little behind the curve.
- jernfrost 9y agoExcept adding tools for doing some kind of macros is much simpler in Go than C because the language is easier to parse. What stops you from using a preprocessor in Go? It is not really part of the compiler in C either.
- pjmlp 9y agoSure it is, ANSI C11 (ISO/IEC 9899:2011) chapter 6.1 and section 6.5.1.1.
- threeseed 9y agoThis isn't a hard concept to understand. People like 90% of Go e.g. simplicity, build process, speed and feel that if they added features such as generics, decent error handling e.g. Option or Exceptions then it might go to 95%. Everyone is looking for that perfect development platform.
- golergka 9y ago> If you want generics, go use Java/Kotlin/something else. I don't see anyone complaining about the lack of generics in C or brainfuck, what makes golang special? Because it's painful to see a language that would be just perfect for a LOT of things with just ONE extra feature - but without this feature that is a requirement, we have to chose alternatives that have irritating downsides.