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

Programmer Humor

25282 readers
652 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
[–] BigDanishGuy@sh.itjust.works 3 points 4 days ago

I get the analogy, but I don't think that it's valid. Soldiers are, much to the chagrin of their commanders, sentient beings, and should question potentially illegal orders.

Where the analogy doesn't hold is, besides my computer not being sentient, what I'm prevented from doing isn't against the law of man.

I'm not claiming to be infallible. After all to err is human, and I'm indeed very human. But throw me a warning when I do something that goes against best practices, that's fine. Whether I deal with it is something for me to decide. But stopping me from doing what I'm trying to do, because it's potentially problematic? GTFO with that kinda BS.