3 ms·
You might as well claim C has garbage collection since there are libraries for it. It's a hack. Might as well claim no language benefits from generics since you
by albinofrenchy 9y ago
You might as well claim C has garbage collection since there are libraries for it. It's a hack. Might as well claim no language benefits from generics since you can always code gen.
For practical issues you have things like compile time, extra tool dependencies and up front setup time to enable a given type.
It makes c++ templates look down right elegant in comparison.
- lobster_johnson 9y agoA more appropriate analogy would be generating C code when developing apps in C. Which people do.
- albinofrenchy 9y agoYes, people absolutely use code generators with C. But they do this because of deficiencies in the language, and everyone basically agrees that C is the lowest common denominator in terms of languages -- it's portable assembly essentially. Go missing generics except for built-in containers; and then not having anything but the bare minimum for those built-ins is a critical defect of the language. The fact that you can work around that defect doesn't make it any less of a defect.
- lobster_johnson 9y agoSure, but it ain't cheating. I was specifically addressing that code generation is a practical solution to a missing feature in the language.
- deleted 9y ago[deleted]