Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-10-13 11:17:14


Gennadiy Rozental <gennadiy.rozental <at> thomson.com> writes:

>
> >>>String-algo : Interested, but concern over interface and choice of
> >>>functions, generic vs basic_string.5.3 separate proposal
> >>
> >> Any details on this? I love this library, and I would love to see it
> >> standardized in some form. Overall I've found the interface and function
> >> choices to be excellent (and I'd love to see even more), and I love that
> >> it's generic and not limited to basic_string. I use it on vectors and
> >> other containers for different kinds of network protocol parsing.
> >
> > Thorsten Ottosen acted as champion for the paper, but I'll try to recall
> > the discussion.
> >
> > There concern was that at least some of the algorithms were only useful in
> > the context of strings, and so it would be an over-generalization to
> > supply them as free algorithms.

My notes say that the solution that got most support was free-standing
functions for "arbitrary strings". So support for stuff like rope was
considered important.

Let me also recap some other feedback:

(a) the algorithms should work directly with string literals as they do
    today in boost.

(b) many requested additional motivation for choosing this particular set of
    functions.

> My point exactly. I believe string_algo library went (completely?) wrong
> way. It should never use iterator parameterization, but char type only. If
> there exist any algorithm that is useful beyond strings - it doesn't belong
> to this library.

Well, there are just too many string types out there to base the interface on
basic_string<CharT>. Besides, it would not be very c++-ish to preach generic
programming yet avoid using it in obvious places in the standard library.

-Thorsten


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