123
submitted 4 weeks ago by cm0002@lemmy.world to c/linux@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] sxan@midwest.social 1 points 3 weeks ago

So, a couple of thoughts. You can absolutely write safe code that produces wrong results. Rust doesn't help - at all - with correctness. Even Rustaceans will agree on that point.

I agree that Rust is safer than C; my point is that if correctness and safeness is the deciding criteria, then why not use Haskell? Or Ada? Both are more "safe" even than Rust, and if you're concerned about correctness, Haskell is a "provable" language, and there are even tools for performing correctness analysis on Haskell code.

But those languages are not allowed in the kernel, and - indeed - they're not particularly popular; certainly not in comparison to C, Go, or Rust. There are other factors than just safety and correctness; otherwise, something like OCaml would probably be a dominant language right now.

this post was submitted on 12 Feb 2025
123 points (97.7% liked)

Linux

6435 readers
353 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS