Y
Hacker News
new
|
ask
|
show
|
jobs
by
iambacktomyword
251 days ago
True, macros in Rust can feel heavy, but they also enable some powerful abstractions you just can’t get otherwise. I guess the “don’t write macros” advice is more about avoiding overuse than rejecting them completely.
1 comments
kachapopopow
250 days ago
The only macro I ever use is json! or for applying 10 derives to more than 1 struct
link
stephenlf
250 days ago
vec!? println!?
link
kachapopopow
250 days ago
those are language macros iirc (hardcoded in the language) hence I consider those the same as when, fn etc.
link