8 ms·
Rust macros strike me as closely related to Scheme hygienic macros; is there a compare-n-contrast anywhere?
by mcguire 9y ago
Rust macros strike me as closely related to Scheme hygienic macros; is there a compare-n-contrast anywhere?
- DC-3 9y agoI believe Rust took direct inspiration from Scheme (or at the very least functional languages in general).
- deleted 9y ago[deleted]
- kibwen 9y agoThe original designers of the macro system absolutely had Scheme firmly in mind (source: I was there). The most telling giveaway is that the identifier for declaring macros, "macro_rules", is a reference to Scheme's "syntax-rules". As for a comparison, Rust macros have to jump through hoops to account for the fact that Rust has syntax (and types), and the Rust system isn't entirely hygienic yet (work in progress).