miniblog.
← Back to all posts
Wilfred Hughes
Feb 6, 2018 at 08:23
Implementing an RPN macro in Rust:
https://blog.cloudflare.com/writing-complex-macros-in-rust-reverse-polish-notation/
(includes a really useful section on robust macros that produce good error messages)
Writing complex macros in Rust: Reverse Polish Notation
Among other interesting features, Rust has a powerful macro system. Unfortunately, even after reading The Book and various tutorials, when it came to trying to implement a macro which involved processing complex lists of different elements, I still struggled to understand how it should be done.