3 ms·
Are Rust macros at all comparable to Lisp macros? Can you re-write the syntax of Rust with Rust macros? Or are they more like C/C++ macros?
by AnimalMuppet 6y ago
Are Rust macros at all comparable to Lisp macros? Can you re-write the syntax of Rust with Rust macros? Or are they more like C/C++ macros?
- steveklabnik 6y ago> Are Rust macros at all comparable to Lisp macros? There are two major kinds of macros in Rust. One of them, macro_rules, is vaguely similar to Lisp macros. It was partially designed and implemented by some big Racket fans, in my understanding. > Can you re-write the syntax of Rust with Rust macros? Within limits. > Or are they more like C/C++ macros? Neither kind of Rust macros are like C or C++'s macros.