P
peter koch
"Logically"? What's illogical about giving your headers the '.h'
extension? They are *h*eaders, aren't they? In the beginning I
remember giving some code fragments extensions '.inc' (it may have been
ASM or some such) because they were *inc*luded. Is that logical?
Well, in my opinion .h is not a logical choice if you want to be able
to see the difference between a C and a C++ header. While both
probably work, I find it nice that you, when you see an #include,
readily can differentiate between a C header and a C++ header. And
while you might not code in C, you will most probably include some C
headers, e.g. files from the standard C library, from Posix or some
third-party library.
I myself prefer cpp for source and hpp for headers, partly because
that's what I have always done and partly because it is the defacto
standard - look e.g. at boost. I have no strong feelings, however, as
long as its not the foolish Linux/Unix convention using .C for
sources. That convention is not portable to case-insensitive file-
systems.
/Peter