5 ms·
There is almost no intersection between the kind of things that can be done with the C++ macro system and the kind of things that can be done with the Rust macr
by JeromeLon 6y ago
There is almost no intersection between the kind of things that can be done with the C++ macro system and the kind of things that can be done with the Rust macro system. They are not related. You can see them as another feature that is not available from C++.
- zozbot234 6y agoYou can get quite close to the use case for Rust macros by considering C++ template-based metaprogramming. Of course the biggest difference is that Rust macros have been designed from first principles, not as a clunky afterthought.
- kibwen 6y agoIndeed, Rust macros are a descendant of Scheme macros, not of C macros.