News for hackers. Stuff that matters.
Re:Rust 1.45 by JeromeLon on Thursday July 16, 2020 @04:41PM (#23863589)
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++.
Re:Rust 1.45 by zozbot234 on Thursday July 16, 2020 @04:49PM (#23863665)
You 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.
Re:Rust 1.45 by kibwen on Thursday July 16, 2020 @07:13PM (#23864964)
Indeed, Rust macros are a descendant of Scheme macros, not of C macros.