My main objection to Rust is how ugly it looks. Why did they have to change things such as how types and functions are defined? I really hate keywords such as def, fn, and other "explicit" function declarations. Also all the :: and <> from C++. Language-wise Java and C# did a much better job at introducing the features they needed without breaking the readability and familiarity of C.
The "spiral" type declaration syntax from C is hard to parse, both for humans and machines. That's probably why even C++ is moving away from it:
It's easy to criticize simple examples like the one above, since the C++ (or Rust) version is longer than the C declaration, but consider something like this: and the idiomatic Rust equivalent: The later can be parsed quite trivially by descending into the type declaration. It's also visible at a glimpse, that the top-level type is a Vec and you can also easily spot the lambda and it's signature.Another ergonomic aspect of the Rust syntax is that you can easily copy the raw type, without the variable name:
While the standalone C type looks like this: which is quite a mess to untangle ;)Also, I think C# is generally closer to Rust than to C when it comes to the type syntax. A rough equivalent to the previous example would be:
I can't deny that "?" is more ergonomic than Rust's "Option<T>", but C# has also a way less expressive type system than Rust or C++, so pick your poison.For C, once I learned that types are best read right-to-left, they became much more scrutable.
I still prefer Rust types though..