Boost logo

Boost :

From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-07-31 07:47:29


Firstly, I think the MPL is a powerful, useful library that should
definitely be accepted into boost.

The biggest problem I have is with the lack of documentation, particularly
for bind/lambda, though I know that Aleksey is working on that.

To add my twopennorth to the discussion of the container/algorithm
separation, it can be important to know the structure of the container when
writing the algorithm, even if it could be written using iterators. Take,
for example, the quick-sort implementation I submitted recently. It uses
pop_front and push_front, which would actually prevent its use on containers
that only supply push_back/pop_back. I could have written it to use insert
and erase, but to do so would hide the inefficiencies so generated --- if a
container only supplies push_back/pop_back, then it is better to rewrite
sort to work backwards, rather than use insert/erase. Also, it always uses
the first element as a pivot, because removing elements from the middle of a
list is inefficient, and removing elements from the front of a container
that supports efficient removal from the middle is no worse. However,
rewriting it to choose a better pivot for containers where removing elements
from the middle is efficient, would improve overall performance by avoiding
worst-case scenarios.

As for "metafunction class" vs "quoted metafunction", I would prefer
something that more clearly meant "a class with a member template apply".
"quoted metafunction" implies you can do quote<my_metafunction>, which you
can't (I know lambda almost gives you that). "metafunction class" is OK, but
possibly slightly confusing.

Anthony



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