Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-09-01 22:14:49


I've found the boost traffic so overwhelming that I've paid little attention
recently, but... the assertion code contributed by Steve Cleary raises the
following thoughts over here in Cambridge, MA:

1. There is no way, without using a macro, to avoid evaluating the assertion
condition. This could be a problem for code such as:

    assert(invariant_checking_function_which_might_be_slow());

2. Anything which constructs exception strings using std components that can
throw (e.g. ostringstream) raises a red flag for me:

    char* big_buffer = new (nothrow) char[kBigNumber];
    // likely to throw bad_alloc.
    assertion(big_buffer != 0, "Couldn't allocate initial buffer");
    // likewise!
    assertion<true,assertion_action_abort>(
                big_buffer != 0, "Couldn't allocate initial buffer");

3. Another way to approach the ODR problem is to take the tack that the
STLPort takes: put each variant in its own namespace. Then you can use a
namespace alias or (ick!) macro to select the variant you want. This even
allows different variants to be linked together into the same program
without conflict.

4. Is this problem really worth solving? Boost participants are spending
*lots* of time refining something for which we already have a workable (if
imperfect) idiom. Let me make some suggestions for things which are *really
missing* from C++:

(chosen at random from python libraries at
<http://www.python.org/doc/current/lib/lib.html>, but you could use Java
libs as inspiration, instead):

regular expression matching
date manipulation
file path manipulation
persistency
threading
gui library

-Dave


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