Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-09-06 22:14:08


"Peter Petrov" <ppetrov_at_[hidden]> wrote in message
news:dflha4$dab$1_at_sea.gmane.org...
> Matt Hurd wrote:
>> There are two other alternatives:
>>
>> 1. enable both by configuration macro (cpp becomes is used as an
>> ipp) - unusual
>>
>> 2. decide on which should be header only to suit lib authors as I
>> suspect simple synch primitives such as mutexes and their locks are
>> needed by most authors.
>>
>> On balance the volume of the voices seems to indicate a preference for
>> library approach rather than a header only attempt.
>>
>> Votes? Further pros or cons?
>
>
> My vote would be for the hybrid approach - i.e. basic stuff is inline by
> default, but in the rare cases when system headers cause problems, it
> should be possible to switch to library-based implementation using a
> configuration macro. This should please everyone.

Trying to please everyone is a recipe for bloated difficult to maintain
code, among other problems, IMO.

Including system API headers from within our public library headers is poor
software engineering practice, and except in the most exceptional
circumstances we should avoid it. Beyond immediate problems, there is a long
history of latent problems surfacing when porting such code to new
platforms.

--Beman


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