4 ms·
I think there is similarity. Lisp can take its own AST, and modify it with its own fully-capable code. In this sense Rust's proc-macros can too. The difference
by pornel 5y ago
I think there is similarity. Lisp can take its own AST, and modify it with its own fully-capable code. In this sense Rust's proc-macros can too. The difference is that Lisp has bare-bones syntax, so the AST manipulation doesn't get tedious. But Rust's proc macros using the quote crate look kinda Lisp-y.
And just like LOOP in Common Lisp, you can totally make Rust macros that are a new language inside a language, and are too clever for their own good ;)