Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-10-10 21:14:28


On Mon, 10 Oct 2005 10:46:35 -0500, Thore Karlsen wrote
> On Sun, 9 Oct 2005 21:32:30 -0400, "Beman Dawes" <bdawes_at_[hidden]> wrote:
>
> [...]
>
> >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.

My take on the discussion is that the concerns can be overcome with some
additional selling to the committee. As Beman indicated, concern was raised
and some discussion happened, but the time for discussion was pretty short
(~30 minutes). Both Thorsten and I gave some explanations, but we didn't
really have a crisp prepared response for the particular issues raised. In
particular, what I wish we would have had more time to do is systematically
step thru the various algorithms with a justification for each. For example:

  trim_right ---> see Perl chomp, see Icon trim, RWCString strip()
  replace ---> see Perl s///, see Icon replace, RWCString replace()
  etc...

(for those that don't know, Icon is programming langauge decendent of SNOBOL4
-- both are known for particularly good string processing capabilities).
Bottom line is that I think most of these can be easily justified with a bit
of research into existing practice.

As for the basic_string versus generic discussion, I have to say, there were
some really well known generic programmers in the room that were shockingly in
favor of adding these to basic_string directly. The basic argument was to
make things more useable to 'normal' programmers -- essentially to serve the
95% case. To me, though, the generic algorithms are far superior because I
want to use the algorithms with new string types (utfstring,
boost::fixed_string, sgi::ropes, boost::const_string, etc). And I think that
with the range interfaces in this library the function interface is very easy
for beginners to use. Again, I think some follow up explanation with clear
examples of the advantages might change minds.

Finally, I think there needs to be a clear presentation of why all the parts
of the library go together. That is, without the classifiers part, the
algorithms aren't easy to use, etc...

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net