Learning Rust and C

I summarized the experience that flipped my view over to "Rust is more beginner-friendly than C" in this other thread. But I also feel @H2CO3's point is an important one. Perhaps pick one of C or Rust to implement a program of middling complexity for fun and learning, and then reimplement the program in the other language to compare how the experiences differ.

My view these days is that sound C is much harder than safe Rust (which is also sound, by design). It's just that there's nothing stopping from you writing unsound C -- in many cases, there's not even something warning you that you have done so! Unsound C will happily compile, run, and maybe work... or maybe not work in weird ways, or maybe crash.

(Writing sound unsafe Rust is another story.)

9 Likes