this post was submitted on 14 Mar 2024
1241 points (98.4% liked)

Programmer Humor

19154 readers
2012 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 13 points 6 months ago (1 children)

A crash is different to a SEGFAULT. I'd be very surprised to see a safe rust program segfault unless it was actively exploiting a compiler bug.

[–] [email protected] 2 points 6 months ago (1 children)

Sure. I haven't seen a proper segfault from any modern, post-C/C++ language in ages. I've never seen a Go program segfault, or a Nim one (although, there are comparatively few of those as a sample size).

So, it seems to me that - purely from the perspective of a user of programs - Rust still seems about as safe as any other modern language - since I've seen no other modern (say, created in the past decade) compiled language segfault. Even the C segfaults seem to be largely becoming rare occurrences, which I have to chalk up to better tooling, because I highly doubt that there's been some magical increase in general C programmer quality in the intervening years.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago)

Yes, the problems rust is solving are already solved under different constraints. This is not a spicy take.

The world isn't clamoring to turn a go app into rust specifically for the memory safety they both enjoy.

Systems applications are still almost exclusively written in C & C++, and they absolutely do run into memory bugs. All the time. I work with C almost exclusively for my day job (with shell and rust interspersed), and while tried and tested C programs have far fewer memory bugs than when they were first made, that means the bugs you do find are by their nature more painful to diagnose. Eliminating a whole class of problems in-language is absolutely worth the hype.