Boost logo

Boost :

From: Nemanja Trifunovic (nemanja_trifunovic_at_[hidden])
Date: 2006-12-06 15:22:08


It seems the answer I submitted earlier did not make to the list. I appolgize
if this creates a second message on the same topic.

> I suppose version 2 is the one you'd like to become part of Boost,
> then? I agree that the free functions are a good stepping stone for
> implementing iterators.

I would prefer to start with version 1, and add iterator adapters only after
they are properly designed.

>
> > 2) IO - currently it is out of the scope of this library.
>
> Why? You can do nice things such as automatically setting the right
> codecvt based on the byte order mark. Works like a bliss. Again, I do
> have some code lying around for this. codecvt facets also provide more
> opportunity for optimisation.

Is your code publicly available? Maybe we can join forces and submit the
library together.

>
> > 4) A string type. There are way too many C++ string types out there
already, and I wanted to provide a tool for
> making them work with UTF-8 encoding, rather than introducing yet another
string class. Probably the
> same philosophy as Boost String Algorithms
http://www.boost.org/doc/html/string_algo.html
>
> I'm sorry, I fail to see how that argument works exactly. Can you elaborate?
> Algorithms that work on different kinds of containers: use free
> functions. I follow that. The alternative is to implement them as
> methods of a string class. Is that the alternative you have in mind?
> That was not what I meant.
> A UTF-encoded string is a container with codepoints (21-bit numbers)
> in an encoded form. The encoding puts some well-formedness constraints
> on the underlying bitstring. This is not unlike std::stack. Why not
> put the constraints in the type?
>

I indeed thought you meant another std::string like class. Could you give an
example how would it look like from a user's perspective?

Thanks.

Nemanja Trifunovic


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