4 ms·
Macros are extremely important to make rust productive. It sometimes feels as if you were writing in a higher level language. One of the best examples is the s
by dgb23 7y ago
Macros are extremely important to make rust productive. It sometimes feels as if you were writing in a higher level language.
One of the best examples is the serde crate. What a beautiful library!
- kibwen 7y agoMacros are powerful, but they should be used sparingly because they often have outsize effects on compilation times and degrading error message quality. I personally give myself a "macro budget" where macro-based solutions are prioritized based on benefit to a particular project.
- pjmlp 7y agoWith great power comes great responsibility. Based on my experience with macros, across several languages with support for them, macros are beautiful until you need to debug them under time pressure on a critical customer issue on a code base that you never seen before.