3 ms·
What is the learning curve for newbies to avoid critical segfaults? If you still have to walk a tightrope to get code across the board, wouldn't all benefit fro
by tomrod 2y ago
What is the learning curve for newbies to avoid critical segfaults? If you still have to walk a tightrope to get code across the board, wouldn't all benefit from a plankway with guardrails instead?
I'm not dissing C or C++ in any way. I've used it. But I recognize there are some major footguns that aren't easy to avoid, causing a much longer learning curve than necessary to get things built. Rust at least seems determined to address them, good or bad!
- sumanthvepa 2y agoTo a first approximation, avoid using raw pointers. They should almost never be needed in application code. Use C++'s standard library facilities for smart pointers and containers instead. They are masterpieces of engineering, and work extremely well.
- tomrod 2y agoWhy avoid using defaults? That's literally the part of an unnecessarily long learning curve needed to learn C/C++ that rust helps with.