4 ms·
Rust macros are their own little thing, they help reduce code repeatability by writing code in your place. You don't need them to write rust applications, but
by Fiahil 7y ago
Rust macros are their own little thing, they help reduce code repeatability by writing code in your place.
You don't need them to write rust applications, but they could, for example, help writing tests on 3 different backends without having to write 3 times the same testing function.
In this situation, it's different from having a type parameter, because macros won't make you change the function definition. They will just "copy and paste" the code block for you.