Summary
In this episode, Jason makes a case against using the .h extension for C++ header files, arguing that it creates confusion about whether a file is meant for C or C++ code. He explains that .h suggests the header is intended for C compilers, which can lead to problems when C projects include C++ headers. Jason recommends using extensions like .hpp or another consistent suffix that clearly indicates C++ header files, especially in projects that mix C and C++ code. He also notes that many tools treat files differently based on extensions, making explicit identification of C++ headers beneficial for better tooling support.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[extern.names]58% match -
[diff.cpp03.dcl.dcl]45% match