this post was submitted on 02 Sep 2024
888 points (99.2% liked)
Programmer Humor
32373 readers
556 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
C++ is not a superset of C.
There were breaking changes between C and C++ (and some divergent evolution since the initial split) as well as breaking changes between different releases of C++ itself. I am not saying these never happened, but the powers that be controlling the standard have worked hard to minimize these for better or worse.
If I took one of my earliest ANSI C programs from the 80s and ran it through a C++23 compiler, I would probably need to remove a bunch of
register
statements and maybe check if an assumption of 16-bitint
is going to land me in some trouble, but otherwise, I think it would build as long as it's not linking in any 3rd party libraries.