To be fair, neither are C preprocessor macros. They're instead token substitutions. It's not that much better, but they're not literally text substitution. They're at least more clever than just that.
They're also of course surprisingly powerful, at the expense of being very cludgy.
C++ templates, coupled with compile time programming, and eventually static reflection, make it easier than the multiple macro languages from Rust, with the additional dependency on syn crate.
sham1|1 year ago
They're also of course surprisingly powerful, at the expense of being very cludgy.
pjmlp|1 year ago