3 ms·
No, I think that practical uses of templates come largely down to simple parametrization, with the exception of a bunch of things that you don't tend to need to
by stormbrew 12y ago
No, I think that practical uses of templates come largely down to simple parametrization, with the exception of a bunch of things that you don't tend to need to hack together yourself anymore since they were incorporated into the stdlib and then elided into builtins from there (mostly thinking of traits and variadic template args here).
But I think the boundary pushing was extremely valuable for seeing how far you could push a lot of these compile time ideas into a language that's ostensibly a traditional imperative language. The recent glut of new compiled languages probably owes quite a bit to seeing the potential of what can be done here mixed with the frustration of how complicated it makes things in C++.
- sillysaurus3 12y agoSorry, I thought my comment came out a bit too judgmental, so I nuked it. (I was saying that templates were mostly useful as simple parameterization, and that the only reason to master this stuff was to read other people's code.)
- Manu343726 12y agoThe key here is to be objective, not falling on a flame thread. C++ templates are ugly, I'm agree, but they are useful and heavily used. Lets make them simple to use with some abstractions.