5 ms·
You seem to be brushing this off as a minor nuisance, when in many cases it is a showstopper. Need it for floats, duplicate it again. This is a solved problem
by Peaker 12y ago
You seem to be brushing this off as a minor nuisance, when in many cases it is a showstopper.
Need it for floats, duplicate it again.
This is a solved problem -- the fact Go doesn't have the solution reflects very poorly on Go.
- coldtea 12y agoThere are some batshit crazy "solutions" offered from Go fans, like "no biggie, just use a templating engine to generate the code for the types you want and compile it".
- Peaker 12y agoI actually use that solution in c (we have some reasons to avoid c++). Of course it sucks, but at least c has the excuse of being from the 70's.
- pjmlp 12y agoThey suffer from a strange distortion field effect.
- orbifold 12y agoIronically that is the solution c++ essentially uses.
- Peaker 12y agoNot quite, given that C++ templates do higher-level type-checking than just expanding and checking. Also, they support higher-order kinds (a template parameterized by a template). And specialization (specifying special cases). And automatic instantiation based on the static types at the call site. Etc.
- oscargrouch 12y agoIts not like you will be creating a collections library all the time you create some program... yes generics are cool for code reuse.. but i think some people just overreact, turning it into something that will make the language unusable or that you will have to copy-and-paste just because of the lack of generics.. this is far from truth..