Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-09-18 11:16:59

At 06:57 PM 9/15/2001, Rainer Deyke wrote:
>----- Original Message -----
>From: "JJ" <john_at_[hidden]>
>To: <boost_at_[hidden]>
>Sent: Saturday, September 15, 2001 2:46 PM
>Subject: [boost] File naming
>> Question: Why are the header files named using .hpp rather than .h or
>> extension?
>The purpose of file extensions is to communicate the "type" of the file,
>both to humans and to computer programs. The '.h' extension is used for
>header files, and therefore communicates the wrong thing when used for
>header files. Using no extension communicates nothing and forces you to
>look at the file contents to determine its type. Using '.hpp'
>unambiguously identifies as C++ header file.
>At least, that's my reasoning for why I use the '.hpp' extension. I was
>not involved in choosing a naming convention for Boost.

That's pretty close to the original reasoning, IIRC. Plus .hpp seems to
work well in actual practice.

I've added the question with your (edited a bit) response to the FAQ.


Boost list run by bdawes at, gregod at, cpdaniel at, john at