2 ms·
FWIW, I chose to learn Rust specifically because of the metaprogramming afforded by procedural macros. The code I write leans heavily on (de)serialization, freq
by hathawsh 7y ago
FWIW, I chose to learn Rust specifically because of the metaprogramming afforded by procedural macros. The code I write leans heavily on (de)serialization, frequent error handling, declarative programming, and other automation. I can hardly imagine how verbose my code would be without procedural macros.
One of the first things I wrote was a procedural macro. Yeah, I like to learn things the hard way, but I'm glad I did! Once I got past the confusing split between proc_macro::TokenStream and proc_macro2::TokenStream, I found that using "syn" and "quote!" is really quite enjoyable.