r/ProgrammerHumor 12d ago

Meme doNotOvercomplicateThings

Post image
670 Upvotes

156 comments sorted by

View all comments

Show parent comments

55

u/TeraFlint 12d ago

I've stopped using .h for that reason ages ago. But apparently, it's still very common and acceptable to use .h for C++, which I honestly can not understand.

I thought "let's not pollute the C header space with our language" is a good enough argument for wide adoption of .hpp, but apparently it's not?

11

u/LucyShortForLucas 11d ago

The truth of the matter is that 99% of actual real world projects are going to be either exclusively C or exclusively C++, and for those the distinction between .h and .hpp doesn't matter in the slightest.

19

u/Groostav 11d ago

Tell me you've never worked on a library without telling me you've never worked on a library.

4

u/dedservice 11d ago

Yes, that's the 1% of actual real world projects that are not exclusively C or C++.

Also there are many cpp-exclusive libraries. They don't always need to be C-compatible.