> Templates are Turing complete (lazily evaluated, purely functional, and side-effect free), so whatever your language of choice can do can be backported to C++ (granted, painfully, but probably less painfully than throwing out all your legacy code and starting from scratch).
This does not logically follow, since templates are evaluated at compile time and hence have restrictions on what they can do.
> C++ supports zero-cost abstraction, so it will get very close to low level C performance (including constant propagation, loop unrolling, type-unsafe transformations, hoisting, inlining, etc, etc) even if you throw piles of lambdas and encapsulated methods at it.
You do have to be careful with what you're doing, though.
> the compiler is slooooowww
I mean, it's not like the Rust compiler is fast either…
This does not logically follow, since templates are evaluated at compile time and hence have restrictions on what they can do.
> C++ supports zero-cost abstraction, so it will get very close to low level C performance (including constant propagation, loop unrolling, type-unsafe transformations, hoisting, inlining, etc, etc) even if you throw piles of lambdas and encapsulated methods at it.
You do have to be careful with what you're doing, though.
> the compiler is slooooowww
I mean, it's not like the Rust compiler is fast either…