4 ms·
Const fn is being worked on (available in unstable rust). C++ style templates (if that's what you mean by template templates) are not something that is planned
by CodesInChaos 8y ago
Const fn is being worked on (available in unstable rust). C++ style templates (if that's what you mean by template templates) are not something that is planned for Rust, but some limited forms of specialization are being considered (a simple version is available in unstable).
For powerful meta programming Rust aims for procedural macros, not for templates, but I'm not too familiar with the details.
- steveklabnik 8y ago> For powerful meta programming Rust aims for procedural macros, not for templates, but I'm not too familiar with the details. Yes, this is a good point. We want Rust to have powerful compile-time metaprogramming, but we also want to do it in a Rust-y way, not blindly copy C++ or any other language.
- baby 8y agoThanks, C++ metaprogramming is awful. Please think of the people who have to read other people's code :)
- stochastic_monk 8y agoThat’s totally fine. Most importantly, I want to work well with functors, generic functions, and compile-time evaluation (for things like manual loop unrolling and so on). I value expressivity, and I appreciate your efforts! I don’t think it will be long before I try it out.