3 ms·
Harder than C++? Harder to use than C? Above is a question, not a snark. I like learning languages and haven’t dabbled in Rust so am curious.
by yumraj 4y ago
Harder than C++? Harder to use than C?
Above is a question, not a snark. I like learning languages and haven’t dabbled in Rust so am curious.
- tptacek 4y agoC++ vs. Rust is a tricky question. C++ is easier to write in, but it's harder to get programs working in it. Rust is harder to write, but it's much more likely that your first execution is going to do something useful. But they're of comparable complexity.
- elcritch 4y agoSecond this. Rust also follows some habits of C++ like verbose syntax and accidental complexity. There was an article recently where a Rust port of a C++ application ended up being comparable in lines of code.
- sn9 4y agoThere's a sense in which people are saying it's easier to learn other languages than Rust because it's easier to get to code that compiles so you can start building new features. There's a different sense that I feel is being overlooked by those people in that the problems you run into with Rust are frequently actual flaws or bugs in your code, and the compiler shouldn't be thought of an adversary blocking your way to feature development but a teacher showing you the things you're overlooking. So once you put in the upfront cost of learning how to write Rust that compiles, you get code that's much more maintainable, correct, and easy to refactor. So for someone that likes learning languages, I'd say choosing to learn Rust is a great choice and will teach you things you can take with you to other languages.