Rust has two parents; it got its looks from C, but much of its character was inherited from its other, less commonly mentioned parent -- ML. Rust has a variation of the Hindley-Milner type system, quite similar to ML (or Haskell). Rust's enum and struct are algebraic data types, also known as sum or product records or types. The type system and pattern matching enable declarative and functional styles of programming that are much less natural to express in C.
That’s right. And forget about the existing rustc compiler implement. If you have something in Rust like
let a: HashMap = immutable_map.iter().map(…);
then you can infer from the semantics that the ordering doesn’t matter and whether it can be parallelized. C doesn’t have the ability to express what you want to happen, just how to do it. That gives Rust far more opportunity for optimization than C possibly can have.C != C-derived languages
In C++ this was possible already in C++03.
OTOH, it wasn't until recently that you were able to write something like `std::array<T, N>` in rust. Even now, there are restrictions on the kinds of expressions that N can be.
Just pointing out that this cuts both ways.
It cannot be matched in in C, even with a lot of macro magic. Plus, C is way too lax with type strictness and enums.