4 ms·
Honestly. Rust is not all that “difficult”. There’s just SO MUCH that you MUST know to be effective. You need to know all of the rustisms. Plus you need to hav
by wredue 3y ago
Honestly. Rust is not all that “difficult”. There’s just SO MUCH that you MUST know to be effective.
You need to know all of the rustisms. Plus you need to have a general knowledge of memory. You need to understand how memory is being abstracted and how to work within those constraints so as not to be slow. You need to know all of the monads, what they mean, why each exists, what the nuance is, and why you might use one over another in a specific situation.
It’s not difficult so much as it just takes so much time and challenging-yourself practice to try to memorize everything.
A “being effective at rust” book would probably dwarf a “being effective at C++” book in pages assuming similar prose. And we all know how much of a beast C++ is.
- spoiler 3y ago> A “being effective at rust” book would probably dwarf a “being effective at C++” book in pages assuming similar prose. And we all know how much of a beast C++ is. I've written C++ for close to a decade before switching to Rust, and this is categorically untrue. > Plus you need to have a general knowledge of memory. You need to understand how memory is being abstracted and how to work within those constraints so as not to be slow. If anything, this is more true so of C++. > You need to know all of the monads, what they mean, why each exists, what the nuance is, and why you might use one over another in a specific situation You can use a lot of stuff before needing to know their full history. You don't need to know the history behind 0, null, pointer, numbers and addresses before, how hardware works, etc to use Option, for example. You also don't need to know the (inconsistent and arcane) history of errno and magic numbers to use Result. Etc, etc. This vastly over-exaggerates Rust's complexity. Yes, it borrows concepts from functional programming, but a lot of these concepts are simpler than stuff you deal with in imperative programming. I think the issues here is that people don't tend to like to change their way of thinking, even if it's for the better. Also, Rust has ample in common with imperative/traditional language, so it's not a huge leap into some alien mental model, as you make it sound. Further, C++ makes you think way more than Rust; in Rust the compiler does a lot of the thinking for you. Not to mention, the type system is easiest to reason about than C++'s old (and mentally inefficient) template system.
- withoutboats3 3y ago"Dwarf"? "Dwarf"?! I may be biased (because I am very effective at Rust and terrible at C++) but I can't believe this seems probable. std::optional, move semantics, boost, template templates, SFINAE(!!) C++ has all the expressivity of Rust and more, with far less regulation to assist the programmer in using it effectively.
- PH95VuimJjqBqy 3y agoyou don't have to know _any_ of what you just listed in order to be effective with C++. the closest thing to required would be move semantics.
- tracker1 3y agoDepends on what you're trying to do. The same can be said of Rust. You can write massive web services serializing days from RDBMS databases quite a bit easier in Rust than with C++ as an example.
- PH95VuimJjqBqy 3y ago> Depends on what you're trying to do. No it doesn't. people were effective with C++ before std::optional existed, before compiler assisted move semantics existed, and SFINAE is not something anyone has ever needed to understand in order to use something like the STL or any other template based library, such as Boost. You don't know what you're talking about, this isn't up for debate.
- thfuran 3y ago>It’s not difficult so much as it just takes so much time and challenging-yourself What's the difference?