Post #3966872
2026-07-20 18:41 UTC
Yeah, it’s not optimal, I don’t think anyone argues that it is. It has a bunch of ways to shot yourself in the foot, no questions about that, people were writing books about that for decades.
But also, a lot of that non-optimality is what gives it advantage. Well, that and enormous amount of legacy code and expertise.
Sometimes you need to pass around raw pointers without caring about memory ownership, and for that situation it’s optimal. I’m glad you have your mandatory curly brackets, but sometimes I just want my microcontroller to blink an LED and for that I’m in turn glad that I can be as quick and dirty as my filthy mind allows me.
And for serious projects we’re all MISRA compliant anyway, and it mandates curly brackets for ifs and proper cases for switch.
Replies (1)
-
@iopq@lemmy.world 2026-07-21 04:33
Let’s not get too abstract. Just because Rust made its own mistakes doesn’t mean it didn’t fix the mistakes I pointed out Serious projects have huge memory safety issues that don’t exist in Rust. More than half of security CVEs are due to the nature of C. Rust just has fewer bugs like Heartbleed because it doesn’t let you do a buffer overrun