Comment by jimmaswell

7 years ago

Similar to languages much fewer people use, instead of languages more commonly used as systems languages which Rust is meant to be.

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