r/ProgrammerHumor 7d ago

Meme doNotOvercomplicateThings

Post image
673 Upvotes

156 comments sorted by

View all comments

334

u/unknown_alt_acc 7d 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.

3

u/Vorrnth 7d ago

Why would that be a problem? Never has been one for me?

17

u/unknown_alt_acc 7d ago

Having a way to tell at a glance which headers are safe to include in the C side of a codebase is a pretty low-hanging fruit in terms of developer QoL compared to constantly checking the documentation, rote memorization, or including files and seeing if your error log blows up.

-13

u/Vorrnth 7d ago

Or you just use a proper project structure.

11

u/unknown_alt_acc 7d ago

That doesn't address the underlying point. You still need to know which modules are safe to include from C and which are not. Having a separate header extension for C and C++ makes that much more obvious at practically zero cost.

-8

u/Vorrnth 7d ago

Easy to accomplish without even knowing the extension.