Re: Unordered container of Glib::ustring





On Wed, Apr 3, 2013 at 12:23 PM, אנטולי קרסנר <tombackton gmail com> wrote:


Why? Isn't it natural to wish to have a map containing user-defined
strings, which may be in any language?

that describes std::string too.

all that Glib::ustring gives you are UTF-8-aware iterators.

if you never iterate over a string that may be UTF-8 in order to get individual characters rather than individual bytes, you don't need ustring and it will complicate your life.

i made this mistake with ustring too, and used it widely. my code now only contains two references to a ustring in about 300,000 lines of code, and they are both places where i have to iterate through a string character by character. everywhere else uses std:;string. the program is fully translatable and has been translated into several languages.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]