Boost logo

Boost :

Subject: [boost] Road to low-quality-code is paved with good intentions of dropping dependencies
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2015-01-07 04:49:05


Hi all,

I've been looking through the latest changes to drop dependencies. Stuff
that I saw is very frightening.

For example:
https://github.com/boostorg/move/blob/develop/include/boost/move/detail/type_traits.hpp
. Every boost release some issues are fixed in intrinsics of TypeTraits and
is_move_* is_nothrow_* traits. Copy-pasting code from TypeTraits feels like
loading a gun and pointing it on own foot.

Another example is a sad story of boost::swap. We can not use Boost.Move
here because it will add "a lot of dependencies" to Boost.Core. This leads
us to nonoptimal implementation, which is sad.

The Solution

Almost *all* of the Boost libraries depend on TypeTraits, MPL, Core,
Assert, StringRef. Language emulation features implemented in Exception,
Move, StaticAssert, TypeIndex should be also widely used. hash_fwd.hpp must
be used by almost all the containers and structures.

So may be we should think of those libraries as of "base" libraries! I do
not mean that they must be moved in a single "base" folder. I'm talking
only about dependency reports: those libraries must be treated by the
dependency tool as a single one and must have the level 1.

Those libraries are "base", because they are the very common part of Boost
framework. Not using them is more like a bad decision, reimplementing parts
of them is an afwull decision. Threating them as base/common/core/main part
of Boost seems reasonable.

-- 
Best regards,
Antony Polukhin

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