But you were talking about generics, which implied you were incorrectly conflating that with template meta-programming, since generics are done with templates.
> I don't think of them as a practical way to do compile time computation
Templates are however the most flexible, advance technique for C++ compile-time programming, though the C++ standard is evolving to bring more and more of those features into the language without using templates, i.e. "constexpr if".
My recommendation would be to avoid speculating on what the benefits are of a language or its features if you clearly don't have serious experience using them. It's fine if C++ is not for you.
> But you were talking about generics, which implied you were incorrectly conflating that with template meta-programming, since generics are done with templates.
I'm aware this is a pointless discussion, but please double check your claims are right if we are in "check mode". I did not say "generics".
>> Any examples of using compile time features that make a difference, instead of making code harder to maintian and increasing compile times significantly?
> My recommendation would be to avoid speculating on what the benefits are of a language or its features if you clearly don't have serious experience using them. It's fine if C++ is not for you.
Maybe you shouldn't make such statements if you don't know about my experience. I am speaking from experience, and exchanging subjective experiences isn't worthwhile most of the time, but sometimes (if people don't go down to personal attacks) there is a new viewpoint to find.
FYI if you’re talking about compile-time programming and you use the word “generic“ (as you did, in the context of a generic sort, which actually does have a meaning related to generics, as the routine works on containers of any type), note that this is a well-established term, which could be confusing if you actually are referring to something else.
But you were talking about generics, which implied you were incorrectly conflating that with template meta-programming, since generics are done with templates.
> I don't think of them as a practical way to do compile time computation
Templates are however the most flexible, advance technique for C++ compile-time programming, though the C++ standard is evolving to bring more and more of those features into the language without using templates, i.e. "constexpr if".
My recommendation would be to avoid speculating on what the benefits are of a language or its features if you clearly don't have serious experience using them. It's fine if C++ is not for you.