801
C++ (ani.social)
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 10 points 3 months ago

point is, Rust manages to give you not a segfault but a meaningful error almost all the time until you use unsafe

[-] [email protected] -3 points 3 months ago

If you’re getting a segfault in C++, it’s also cause you used unsafe code. It’s just not officially enclosed in an “unsafe” block.

[-] [email protected] 7 points 3 months ago* (last edited 3 months ago)

the point was not on the unsafe word, but a very specific feature of Rust that helps enclosing unsafe code where the compiler wouldn't be able to 100% verify your logic. no such thing in C++. C++ does not even attempt to verify safety

your response is basically "get better at coding dumbass, I am the safety validator"

this post was submitted on 16 Mar 2025
801 points (98.2% liked)

Programmer Humor

24262 readers
1012 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 2 years ago
MODERATORS