InfoQ Homepage Macros Content on InfoQ
Articles
RSS Feed-
How to Use Rust Procedural Macros to Replace Panic with syn’s Fold
In this article, we show how you can write advanced macros to step through Rust code and modify it. Using the standard tooling available in the syn crate, we first show how to change the occurrence of a panic into an Err. Then we go a step beyond and use the Fold trait to recursively step through the entire function, automatically executing a change in every applicable location.
-
Book Review and Interview: Real World OCaml
The new book Real World OCaml provides a deep dive into the OCaml programming language. InfoQ caught up with the authors to hear about real world Ocaml users, its unique features, and much more.