4 ms·
Generics, and also heavy use of traits and macros can make code hard to follow IMO.
by skohan 6y ago
Generics, and also heavy use of traits and macros can make code hard to follow
IMO.
- mrec 6y agoI can't quantify it, but I get the impression that the Rust community is starting to turn against unnecessary use of generics and proc macros of late, albeit largely because of their impact on compile/link times rather than readability.
- skohan 6y agoI think macros are incredibly powerful when used parsimoniously, but can make code completely inscrutable and surprising when overused. There's probably an unavoidable trade-off between the flexibility and expressiveness of a language and readability (and possibly compile times). It's part of the reason I would recommend a more restrictive language like Go in a professional setting, even if I would rather program in Rust at home.