3 ms·
> Unfortunately, "it is fine in this context leave me alone" is often incorrect That's a very overused argument and IMHO wrong way to sell Rust. The reality is
by Galanwe 4y ago
> Unfortunately, "it is fine in this context leave me alone" is often incorrect
That's a very overused argument and IMHO wrong way to sell Rust.
The reality is, even if 100% of C bugs were memory safety related, that still does not mean every C program is riddled with bugs. If that were the case, nobody would write C programs in the first place.
There is a strong selection bias in play here. You only see times where memory safety caused an issue because you get a segfault/overflow/etc but just have invisible correct behavior at all other places.
Maybe I was lucky with the people and companies I worked at, but memory safety overall has never been a big issue with our C softwares. Sure it happens from time to time, but it's definitely not any kind of plague.
Still I'm learning Rust, so why?
For me, it has to do with the library ecosystem. It's very hard to find good quality, easily pluggable, performant C libraries. You always end up having to re implement half of the data structures you need, or use sub par configuration formats just because you don't have readily available libraries.
I think this is a much more compelling, and frankly true, argument for C programmers to use Rust.
- UncleMeat 4y agoEvery C program of meaningful complexity that operates on user data is riddled with bugs. Go look at the linux kernel. Arguably the most important C program on the planet. Absolutely enormous incentive to get it correct. It is... full of bugs. Including a large number of memory safety bugs.