Boost logo

Boost Testing :

Subject: Re: [Boost-testing] A Debian/Sid testing machine
From: Gennaro Prota (gennaro.prota_at_[hidden])
Date: 2008-10-18 05:05:17


Vladimir Prus wrote:
> Gennaro Prota wrote:
>
>> Steve M. Robbins wrote:
>>> On Wed, Oct 15, 2008 at 08:41:33AM -0400, Beman Dawes wrote:
>>>
>>>> For release, it isn't helpful for 1.37.0. It is too late in the release
>>>> cycle to add a platform.
>>> I see. May I still run the tests on release, just in case some
>>> authors have the time to fix errors for GCC 4.3? Or is it just noise
>>> that you'd prefer me to stop submitting?
>> Speaking for myself (dynamic_bitset), I'm interested in the
>> results; shouldn't you get a go-ahead here you can just mail me
>> directly. That being said, it's opportune to remark that I
>> consider dynamic_bitset an experiment that failed, under many
>> respects,
>
> Interesting. Can you tell why?

Yes. There's a long list of issues but the two main ones are
IMHO a) mimicking the hybrid design of std::bitset b) lack of
iterators.

About the former, I'll partially copy-and-paste from an old
article I was writing:

Bit manipulation is a recurring task in system and application
programming, for a variety of problem domains: representation of
sets and their operations or relations (union, difference,
intersection, complement, inclusion), graph algorithms, cyclic
redundancy checksums, big integer arithmetic, look-ahead
character calculation in parsers and compilers, and many others.

On the basis of the abstraction being involved we identify three
big areas:
  1. mathematical sets
  2. "bit arrays" or generally bit sequences
  3. big integers

Both boost::dynamic_bitset and its derivation proposed in
[N2050] /partially/ cover needs 1. and 2. This incompleteness of
coverage comes in fact from std::bitset, on which dynamic_bitset
is in turn based. It is worth noticing that [N0220 - Allison,
1993] was already clear on recognizing this limitation: "Neither
of these classes [bits<>, later to become std::bitset<>, and
bitstring, not standardized] attempts to provide complete
semantics for mathematical sets, but member functions exist that
provide the equivalent of union, intersection, and symmetric
difference as well as insert, remove and test for membership."
The Boost experience has highlighted that this "dual" design not
only has no practical benefits but effectively confuses users.
Which shouldn't surprise: it simply does not separate concerns.

About lack of iterators... as soon as you begin to use
dynamic_bitset in real applications you need a lot of algorithms
which are in the standard library but cannot be applied to
dynamic_bitsets (I introduced find_first/find_next, which are
probably the most often required, but where do you stop? And how
do you allow user-defined algorithms...).

I seriously hoped that the new iterator categories got into
C++0x. Because (1), (2) and (3) can be addressed, but the
iterator problem seems unsurmountable without them.

-- 
Genny

Boost-testing list run by mbergal at meta-comm.com