| ▲ | josephg 4 hours ago | |
It is?? Can you give some examples of high performance stuff you can do using C++'s template system that you can't do in rust? | ||
| ▲ | jandrewrogers 28 minutes ago | parent [-] | |
They are likely referring to the scope of fine-grained specialization and compile-time codegen that is possible in modern C++ via template metaprogramming. Some types of complex optimizations common in C++ are not really expressible in Rust because the generics and compile-time facilities are significantly more limited. As with C, there is nothing preventing anyone from writing all of that generated code by hand. It is just far more work and much less maintainable than e.g. using C++20. In practice, few people have the time or patience to generate this code manually so it doesn't get written. Effective optimization at scale is difficult without strong metaprogramming capabilities. This is an area of real strength for C++ compared to other systems languages. | ||