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

Programmer Humor

22736 readers
1532 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
801
C++ (ani.social)
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/programmer_humor
 
you are viewing a single comment's thread
view the rest of the comments
[–] LaggyKar 44 points 1 month ago (3 children)

This is something that Rust is specifically designed to prevent.

[–] [email protected] 9 points 1 month ago

C/C++ is mildly obsolete now, basically. Breaking the memory model is not really a small defect that's a matter of taste.

[–] [email protected] 5 points 1 month ago (1 children)

There are C++ analyzers like this which are also designed to prevent it (if you have no choice between languages).

[–] [email protected] 7 points 1 month ago* (last edited 1 month ago) (1 children)

I've seen things like this posted several times on here. It always turns out it doesn't actually catch all the possible problems, or it's garbage collected, or it's non-usable for real code.

If it was that easy, the people who wrote Rust with all it's complexity and divergence from the norm were idiots, and I really don't think they were.

[–] [email protected] 7 points 1 month ago

It's pleasure for me to write in rust, I really like how fast I can deploy a working solution (including debug time). As I mentioned, there are situations when, for some reason, you cannot do without C++. But you are right cpp-analyzers do not solve all possible problems.