this post was submitted on 22 Jul 2025
363 points (98.4% liked)

Programmer Humor

25180 readers
1632 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
[โ€“] panda_abyss@lemmy.ca 84 points 1 day ago (28 children)

I actually do like that C/C++ let you do this stuff.

Sometimes it's nice to acknowledge that I'm writing software for a computer and it's all just bytes. Sometimes I don't really want to wrestle with the ivory tower of abstract type theory mixed with vague compiler errors, I just want to allocate a block of memory and apply a minimal set rules on top.

load more comments (26 replies)