3 ms·
C is easy to read and follow though. Rust has far more syntax and as a language is way beyond the complexity of C.
by formerly_proven 5y ago
C is easy to read and follow though. Rust has far more syntax and as a language is way beyond the complexity of C.
- nicoburns 5y agoOnly if you know C but not Rust. I personally find Rust fairly easy to follow and C a complete nightmare (the details in C are ok, but it's really hard to see the forest for the trees).
- edgyquant 5y agoI know C and can get by in Rust and I disagree that rust is easier to follow. C is a simple language, the complexity comes from large systems, while Rust is just not.
- nicoburns 5y agoWell I know Rust and I can get by in C. Perhaps that makes a difference. > C is a simple language, the complexity comes from large systems, while Rust is just not. I mean I agree that C is simple if you're making a 50 line program that writes to stdout or something. But more often than not with C or Rust you are working with a large complex system. And I'd argue that when working with such a large system, Rust programs are less complex than C programs.
- formerly_proven 5y agoThere is a huge difference between reading and writing C. C is very easy to read, but it's quite difficult to write (secure, portable, performant) C. Code is typically read a lot more than it is written. I haven't written a single line of code in torvalds/linux.git but read probably tens of thousands of lines of Linux kernel code over the years. I'd wager that for every kernel developer there are at least 10 people reading the code to figure out how something works, or how it broke. C makes many questions when reading trivial to answer, questions like "how do I get here?", "where does it go?", "what is this type?" and "what does this code do?" are generally very easy to answer without expert-level C knowledge. From what I've seen, that's not true for rust.