4 ms·
> It is the least readable language I’ve seen not because of the syntax but because of all the cleverness going on around the traits and macros. Definitely agr
by NoboruWataya 2y ago
> It is the least readable language I’ve seen not because of the syntax but because of all the cleverness going on around the traits and macros.
Definitely agree about macros. A lot of crates use them extensively, but they are inherently less intuitive to reason about, tend to be less well documented and produce less helpful error messages when you use them incorrectly.
I think a lot of trait misuse probably stems from the fact that structs kind of look like classes and traits kind of look like interfaces, so people may try to do Java-style OOP with them.
(As an aside, the other thing that makes it difficult for me to grok Rust code is when everything is nested in 3+ levels of smart pointers.)