2 ms·
Well, Rust has macros [0], too! [0]: https://doc.rust-lang.org/book/macros.html https://doc.rust-lang.org/book/macros.html
by nikolay 10y ago
Well, Rust has macros [0], too!
[0]: https://doc.rust-lang.org/book/macros.html https://doc.rust-lang.org/book/macros.html
- nickik 10y agoRust has tons of problems with macros and they are still not fully in the language (last I checked). Rust macros actually do go back to Lisp. Specifically the Dylan language, a Lisp once envisioned as the equivalent of modern Objective C by Apple. Their are a number of papers from that period that you can read. Macro systems are not all the same, they don't all have the same power. Clojure uses a very powerful form that is not as safe. Their is a lot of modern research in Racket. A extremely powerful macro in a language with syntax was specified but never implemented by David Moon, you can find it here: http://users.rcn.com/david-moon/PLOT/ http://users.rcn.com/david-moon/PLOT/
- steveklabnik 10y ago"Macros" can be an overloaded term in Rust. Specifically, "macros" mean "macro_rules!", which is very much in the language. Compiler extensions, which are sometimes called "procedural macros", are still unstable.