Advanced function resolution technology is one of the main reasons I use C++. The combination of being statically typed yet allowing users to create elaborate function dispatch hierarchies is unmatched.
Oh not complex at all. This is a boon for programming computations for GA (geometric algebra). There are libraries that automatically generate algebras and operations within those algebras (such a versor: http://versor.mat.ucsb.edu/), and then you can operate on user-defined versors naturally. It actually makes things less complex because you don’t need to remember a million function names. This is one of the special cases where templates and advanced function dispatch enable super powers. 100% optimal code, type-safe, user-defined, expressive, and automatically generated. Watch your compile times though
boost::spirit and boost::qi are similar uses of deep secrets of template magic. They work nicely, until you make your first minor error and have to understand the whole machinery to get what's wrong.
Maybe someday we'll have a language that is efficient and also allows creating efficient and usable DSLs. C++ ain't it.
Assuming you're talking about Concepts, I've heard Andrei Alexandrescu, for example, challenge that hope [0], but I'd be happy to hear this has been fixed.
There's not need to be dismissive. C++ has a somewhat strange position in that it is statically typed but the mechanism of type resolution is fairly loose. This, coupled with SFINAE, allows for concise declarations of things that would take much more work in other languages (or not be possible). If you've ever written a generic constraint in Rust specifying every arithmetic operation that you use in the function body, then you'll know what I mean.
Yes transparent dispatch into templated functions (chosen via SFINAE) may not be everyone’s cup of tea but I prefer it to a separate macro language. No exclamation marks, looks like a normal function and later can be reimplemented as a normal function.
The huge problem with SFINAE and most template techniques is that the semantics of the operation are completely different from the intention, and this always shows in error messages for any small mistake, even most of the ones your users make.
Concepts were supposed to help, but based on what I've heard, they sometimes make the error messages even worse, so I'm not sure.
What are you talking about? Julia is dynamically typed and Rust doesn't support function overloading. It's hard to imagine two worse languages to compare to C++ in response to that comment.
Julia and Rust always come up in discussions of C++, so a lot of people develop the idea that they are better than C++ at everything. This leads to pattern matching and just saying "why not Rust" in every discussion of C++.
Julia is dynamically typed, but if the compiler can deduce the type of your expressions, it will usually generate specialized code that avoids dynamic dispatch. Getting rid of type instability (as it is called) is usually one of the first things I do when trying to optimize a Julia function.
The discussion about C++ lookup rules actually really reminded me of Julia, where functions are quite often overloaded and it is not always trivial to figure out which one should be called. For lack of a better source, there is something about that in this talk: https://youtu.be/TPuJsgyu87U?t=989