this post was submitted on 02 Feb 2024
22 points (100.0% liked)
Programmer Humor
32461 readers
737 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++ streams are ugly in their own right, but C++ preferred practice these days is to treat it as its own language rather than as a C superset. That is, lots of crufty old C stuff still works in C++ for legacy reasons, but using it when you don't have to is considered inappropriate.
The real fun about treating C++ as a superset of C begins when you run into cases where the languages differ.
I'm not talking about classes and templates and stuff like that either, I'm talking about relatively simple syntax that people expect to be present in both languages.
is valid C++, but will not valid C. That's because the definition of a what a statement is differs between the two and has since the 80s!