|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2002-06-12 19:16:39
on 6/11/02 11:25 PM, Dan'l Miller at optikos_at_[hidden] wrote:
[SNIP explanation of this thread to non-Boosters]
> [ FORMAL REVIEW OF DYNAMIC BITSET ]
>
> Allow me to start with a complement, the boost::dyn_bitset does an excellent
> job of taking compile-time-sized bitset as a reference and evolving its
> interface into a run-time-sized analogue. Even the tougher issues such as
> operator = and the concept of a reference to a bit were addressed. (Pun
> intended, I suppose.)
>
> But now on to my harsh concerns which lead me to a firm vote of: NO! PLEASE
> DO NOT EVER ACCEPT THIS AS A LIBRARY IN BOOST. PLEASE DO NOT EVER SUBMIT THIS
> LIBRARY FOR STANDARDIZATION IN C++0x. BECAUSE OF THE FIVE SEVERE DEFECTS
> ENUMERATED BELOW, THE ONLY WAY THAT I SEE TO FIX boost::dyn_bitset IS TO
> WITHDRAW boost::dyn_bitset IN ITS ENTIRETY. An already extant replacement
> strategy is interspersed below.
>
>
> [ DEFECT #1: design which diverges against SGI STL's bit_vector ]
[SNIP]
> [ DEFECT #2: design which diverges against SGI STL's vector<bool> explicit
> specialization ]
[SNIP]
Actually, I (and probably many others) think that the problem is in STL
making the "std::vector<bool>" special in the first place. There's no way
to get a standard vector of "bool" with normal storage semantics. The
vector with bit-packing should have been reserved for a separate
"bit_vector" (or "dyn_bitset") type, and "std::vector<bool>" should have not
been specialized.
So we don't necessarily need a "bit_vector" or "dyn_bitset" type, we really
need a "real_bool_vector" type. (Or we reverse everything for the next
standard by non-specializing std::vector<bool> and adding "bit_vector".)
> [ DEFECT #3: omission in design & vision ]
[SNIP]
> [ DEFECT #4: omission in documentation ]
[SNIP]
> [ DEFECT #5: lack of vision ]
[TRUNCATE]
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk