C++ Logo


Advanced search

Subject: Re: [SG16-Unicode] code_unit_sequence and code_point_sequence
From: Lyberta (lyberta_at_[hidden])
Date: 2018-06-19 10:11:00

Martinho Fernandes:
> Simply "replacing basic_string" isn't enough. If basic_string can fill
> the role intended for code_unit_sequence just fine, then it isn't clear
> at all how this replacement is necessary nor better. So exactly what
> does code_unit_sequence do better than basic_string?

* It has a better name. This will have wide consequences for
teachability of C++ and Unicode in general. People don't understand
Unicode because people who created APIs didn't understand Unicode either
and wanted to cop out by simplifying things. Once we get to std::text,
there will be countless questions about the difference between
std::string and std::text. We can do damage control by deprecating
* It handles endianness. std::basic_string understands only native
* It will allow us to use better allocator design (if it surfaces fast
* Not just allocators though, std::basic_string is widely recognized as
one of the worst designed classes in the standard library:


We can do better than that.

SG16 list run by sg16-owner@lists.isocpp.org