by RaycatRakittra · 7y ago · 0 comments
If this is for fun / education then learn Rust. It's conceptually nicer and doesn't have legacy cruft from decades of industrial use.
The first component is conventions and idioms for managing allocations, and Rust will force you into (and support) some good (but nontrivial) ones.
The second component is self-discipline. Look at the long history of vulnerabilities in C and C++ code that are due to carelessness -- of an oops that a programmer made when they knew better.
If what's being considered is Rust as a stepping stone to C++, how much does Rust help with the first component, and is Rust even counterproductive for the second component?
Regarding counterproductive for the second component, you might've seen a conventional practice of grinding the Rust Clippy until the code compiles. I don't know how that affects the development of self-discipline (e.g., maybe some people try to make a practice of being Clippy-free on every compile attempt?), but it seems a reasonable and interesting question to ask.
(I'm not dissing Rust for this. I mostly like Rust, and would be happy to be working in/on it.)
I suggested that possibility, but is it generally true, or something personally true for you, or are you advocating that it would be good if people did that?
There are of course, fairly significant differences in idioms, and things like that, but that’s true for every language switch.