Crust of Rust: Declarative Macros
Video Statistics and Information
Channel: Jon Gjengset
Views: 28,661
Rating: 4.9809299 out of 5
Keywords: rust, live-coding, macros, macro_rules, declarative
Id: q6paRBbLgNw
Channel Id: undefined
Length: 96min 11sec (5771 seconds)
Published: Wed Apr 29 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Thanks for the stream, great as always! I've kind of avoided macros in the past due to the fear that they are not exactly the pinnacle of elegance and at least now I know where the nastiness lies! The last part reminded me of the dirty tricks that you sometimes have to do in generic C++ code 😅
A couple of suggestions for future stream topics:
Also, please, please don't completely abandon your long-form stream format! I get that shorter streams are easier both for you and the audience but a chance to dive deep into a problem and watch you make substantial progress on it is something unique and awesome.
Awesome video.
That macro counting hack is NASTY though.
Thanks Jon. Watching your videos is what got be interested in Rust in the first place.
Great stream today Jon!
Great stream as always. Glad you also showed another use case (at 44:10), that definitely gave some good inspiration for where macro_rules can be useful.
Just had a chance to watch this. This one was even better than the first! I'm loving this format; you are comprehensive, without being repetitive and build things up step by step.
If you are planning more of these, I'd love to see one on Iterators. This is clearly a large topic, but for me, the biggest gaps are how to make a type iterable and how to add my own "itertools" type of functionality.
What about using this for the first rule?
This way, you avoid both reallocation and the counting hack