4 ms·
Is it just me, or does Rust code always seem very clean and tidy? I haven't seen a Rust project yet where the code seemed "ugly". It's such a pleasure to look
by rudolf0 12y ago
Is it just me, or does Rust code always seem very clean and tidy? I haven't seen a Rust project yet where the code seemed "ugly".
It's such a pleasure to look at compared to C++ (though nested generics are still a pain).
- bwilliams 12y agoI agree, with the exception of to_string() and as_slice() all over the place when dealing with a lot of text.
- steveklabnik 12y agoto_string() will still be a thing, but many uses of `as_slice()` should be fixed by using &foo instead of foo.as_slice() in many cases.
- FreeFull 12y agoIf you want to see ugly code, you could look at the compiler's source code. A lot of code in it is clunky because it has evolved since Rust was a very young language, with gradual changes rather than full rewrites.