this post was submitted on 22 Jul 2025
407 points (98.1% liked)

Programmer Humor

25448 readers
930 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
 

I don't think that casting a range of bits as some other arbitrary type "is a bug nobody sees coming".

C++ compilers also warn you that this is likely an issue and will fail to compile if configured to do so. But it will let you do it if you really want to.

That's why I love C++

you are viewing a single comment's thread
view the rest of the comments
[–] BatmanAoD@programming.dev 3 points 1 week ago (7 children)

Borrow checking...existed in C++ too

Wat? That's absolutely not true; even today lifetime-tracking in C++ tools is still basically a research topic.

...someone found memory bugs in Rust, again, because it is NOT soundly memory safe.

It's not clear what you're talking about here. In general, there are two ways that a language promising soundness can be unsound: a bug in the compiler, or a problem in the language definition itself permitting unsound code. (unsafe changes the prerequisites for unsoundness, placing more burden on the user to ensure that certain invariants are upheld; if the code upholds these invariants, but there's still unsoundness, then that falls into the "bug in Rust" category, but unsoundness of incorrect unsafe code is not a bug in Rust.)

Rust has had both types of bugs. Compiler bugs can be (and are) fixed without breaking (correct) user code. Bugs in the language definition are, fortunately, fixable at edition boundaries (or in rare cases by making a small breaking change, as when the behavior of extern "C" changed).

[–] vivendi@programming.dev 0 points 1 week ago* (last edited 1 week ago) (6 children)

Have you heard about cve-rs?

https://github.com/Speykious/cve-rs

Blazingly fast memory failures with no unsafe blocks in pure Rust.

Edit: also I wish whoever designed the syntax for rust to burn in hell for eternity

Edit 2: Before the Cult of Rust™ sends their assassins to take out my family, I am not hating on Rust (except the syntax) and I'm not a C absolutist, I am just telling you to be aware of the limitations of your tools

load more comments (3 replies)
load more comments (3 replies)