News for hackers. Stuff that matters.
Re:Why the C++ standard ships every three years by Retra on Saturday July 13, 2019 @04:27PM (#20429964)
Rust is not based on C++. People coming from Haskell/ML aren't used to C's backwards type declarations, and that's why they're not in Rust; the people who make Rust have experience with more than just C/C++. So it's not different for the sake of being different, it is actually trying to be similar ... just not similar to C.
Re:Why the C++ standard ships every three years by jimmaswell on Saturday July 13, 2019 @04:33PM (#20429990)
Similar to languages much fewer people use, instead of languages more commonly used as systems languages which Rust is meant to be.
Re:Why the C++ standard ships every three years by steveklabnik on Saturday July 13, 2019 @05:02PM (#20430139)
In general, it’s a thing more newer languages are moving to, because it’s regarded as superior for a few different reasons. Mostly, it keeps the syntax more regular when you have type inference. See Kotlin as another recent example.

In rust, we have additional reasons, and that’s because it’s not

  let name: type = expression;
It’s

  let pattern: type = expression;
Patterns offer more power than simple variable declarations. The names may not correspond 1-1 with the type, because you can create multiple names by destructuring more complex types