Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-09-18 13:19:49

----- Original Message -----
From: Beman Dawes <bdawes_at_[hidden]>
To: <boost_at_[hidden]>; <boost_at_[hidden]>
Sent: Tuesday, September 18, 2001 1:16 PM
Subject: Re: [boost] File naming

> 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
> no
> >> 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
> C
> >header files, and therefore communicates the wrong thing when used for
> C++
> >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.
> --Beman
I'd like to add that there is a very important reason why it is convenient
to differentiate between C and C++ headers: although C++ derived from C,
they are currently *different languages with (sliglty) different rules*.

Fernando Cacciola
Sierra s.r.l.

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