|
Boost Users : |
From: Thore Karlsen (sid_at_[hidden])
Date: 2005-10-11 14:15:37
On Mon, 10 Oct 2005 15:14:19 -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.
>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.
>
>One way to counter that argument would be to identify the functions you have
>found useful on other containers, and to provide some use cases to buttress
>the argument.
Well, one thing I use it for is parsing HTTP directly in the read
buffer, which is a vector. If the interfaces weren't generic, I'd either
have to write my own functions to duplicate the functionality, or I'd
have to copy the incoming data to a string. The first seems silly, and
the latter would have unacceptable overhead in my case. The HTTP I'm
parsing is streaming video from several dozen cameras at once, so I have
to work with the buffers directly.
I also use this library on plain old C strings, which wouldn't be
possible if it were locked to basic_string.
Some changes may make sense, but I really like the way it is now.
-- Be seeing you.
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