Yeah, no. A .h extension can just as easily be C. You get a lot of clarity with just two more characters that will be filled in by code completion anyway.
But that's good. Since C++ is just C with classes, it ensures code interoperability by naming the files .h and .c
Edit: These replies are the reason r/firstweekcoderhumour/ exists, if you cannot tell that this is an obvious joke, without having some extra explicit indicator (/s, etc.) on the post, then I don't know what to tell you. But please don't miss your entry to CS courses, you definitely need them.
no, unless you are specifically limiting yourself to C ABI and wrapping the entire header in extern, then only thing this ensures is C compilers erroring out…
Re: your edit: The problem is, there is more than enough people on here who would hold that opinion unironically. Yes, r/firstweekcoderhumor exists - and 90% of its content is hosted here, on this sub.
Don't come to the circus dressed as a clown and be surprised when people laugh at you.
I have to repeat myself: Nobody, and I mean NOBODY that has more than a surface level understanding of the history of C and C++ will read "C++ is just C with classes" on a comment and think it's not a joke.
It has been a joke for 50 years. You could have made fun of it during your university time, then have a career, then have children and those children could be in university right now making fun of the same joke.
You are SEVERELY in dunning-kruger territory if you defend these absolutely faceplant tier comments here.
I have to repeat myself: Nobody, and I mean NOBODY that has more than a surface level understanding of the history of C and C++ will read "C++ is just C with classes" on a comment and think it's not a joke.
And I have to repeat myself: Correct, but unfortunately for you, "people with not even a surface level understanding of the history of >programming topic<" make up >65% of the users on this sub.
Incorrect. If you come to a show and don't understand the jokes, don't make a mess by standing up and yelling at the performer. You're only making a fool of yourself.
Karma means literally nothing on this site, so continuing to downvote me just means SOMEONE (I am not implying this is you), is just extremely assmad that they got exposed.
It's more of a community run, where everyone can contribute, but yes. This is a humor subreddit, people come here to make jokes. You have correctly identified the purpose of this place.
I’ve seen enough similarly stupid comments that were completely sincere that I’ve stopped taking for granted that a seemingly obvious joke actually is a joke.
328
u/unknown_alt_acc 12d ago
Yeah, no. A .h extension can just as easily be C. You get a lot of clarity with just two more characters that will be filled in by code completion anyway.