News for hackers. Stuff that matters.
Re:Writing Complex Macros in Rust: Reverse Polish Notation by mcguire on Thursday February 01, 2018 @11:27AM (#16283095)
Rust macros strike me as closely related to Scheme hygienic macros; is there a compare-n-contrast anywhere?
Re:Writing Complex Macros in Rust: Reverse Polish Notation by kibwen on Thursday February 01, 2018 @12:57PM (#16284008)
The 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).
Re:Writing Complex Macros in Rust: Reverse Polish Notation by DC-3 on Thursday February 01, 2018 @12:52PM (#16283945)
I believe Rust took direct inspiration from Scheme (or at the very least functional languages in general).