Boost logo

Boost :

From: James Slaughter (subscriptions_at_[hidden])
Date: 2001-07-03 17:59:30


My money's worth:

I've been bitten before by Boost's defect regarding use of <file> where
"file" is appropriate, and cursed myself for not voicing an opinion the last
time the issue was raised. Unfortunately I'm less of an expert than some
people on the list and tend to lurk harmlessly.

In my experience, #include<> is best reserved for system headers, which are
nothing like boost headers because they tend to be stable (not upgraded once
or twice a month) and common-place (at least, installed by default for a
given platform).

I prefer to keep a version of boost that I know works with my code within a
project's source tree. I'd very much like to be able to refer to that
location with relative paths, using #include "../libs/boost/etc.hpp".
Instead, I have to mess around with my project or compiler's environment
variables and command line options.

Since the locations used with #include <> are a subset of those matched by
#include "" (for a more-conforming compiler), it's not clear that using the
bracket notation has any advantage for Boost.

Regarding Vesa's comments, whilst I've personally never seen a system where
the difference in search times is measurable, I certainly agree with the
safety aspect - "config.hpp" is a name I'd rather keep out of my system
include paths.

I'd also like to mention that I've often had to explain to less experienced
programmers that, "No, boost/xyz.hpp isn't a standard header and although
some parts of it might be one day, it'll almost certainly have a different
name". Perhaps the time taken for mortals to understand was what Vesa was
thinking about.

Regards,
James.

----- Original Message -----
From: "David Abrahams" <david.abrahams_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, July 01, 2001 4:43 PM
Subject: Re: [boost] Coding guidelines - comments

> I am not going to weigh in on this one, but will be happy to incorporate
the
> group consensus in the final document.
>
> ----- Original Message -----
> From: "Vesa Karvonen" <vesa.karvonen_at_[hidden]>
> > Before observing that Boost uses <...>, I always reserved <...> for
system
> and
> > standard headers (Boost is neither of those) and used "..." for user
> headers.
> >
> > I have observed that the same convention is followed by many programmers
> (e.g.
> > Jaakko Järvi, Bjarne Stroustrup, John Lakos, John Barton, Lee Nackman,
...
> > just checking a couple of books on my desk), and those that do not
follow
> the
> > standard, don't generally know the difference between <...> and "...".
> (FYI,
> > I'm not talking about David Abrahams, which I assume knows the clauses
> that
> > describe their behavior.)
> >
> > I think that the reason why <...> is better suited for system and
standard
> > headers is that "..." may result in looking at more places. I think that
a
> > proper separation of <...> and "..." results in faster and safer header
> > look-up by the preprocessor:
> > - Faster because system & std headers are looked-up in only the <...>
> places.
> > - Faster because user headers are found after lookup in only the "..."
> places.
> > - Safer because a system|std header is not accidentally overridden by a
> user
> > header.
>
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk