Subject: Re: [boost] [UTF String] Feedback on UTF String library, please
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-02-11 17:07:42
On Fri, 11 Feb 2011 13:24:06 -0500
Vlad Lazarenko <vlad_at_lazarenko.me> wrote:
> On Fri, Feb 11, 2011 at 12:44 PM, Chad Nelson
>>> For example, you have this "almost" random-access feature that,
>>> IIUC, for UTF-8 will give you O(1) random access if you have only
>>> ASCII characters and for UTF-16 will give you O(1) random access
>>> if you have only BMP characters. That's just horrible! [...]
>> If you put it that way, you're right. I assumed that the developer
>> using the library would read the documentation and know that the
>> iterators weren't always true random-access, but that assumption
>> doesn't stand up to conscious examination.
> Unfortunately, users tend not to read documentation. From my
> experience, many just using copy-paste from examples and modify the
> result to fit their needs.
Mine too -- that's what I meant by conscious examination, when I
thought about it I realized that almost no one reads documentation
except as a last resort.
> IMHO the default behavior should be the fastest from the most safest.
> But having an example of "tricky" usage to improve performance with
> the explanation of pros and cons will help some users to copy-paste
> from the right place and read documentation before they do so.
Hm, nice idea. Thanks.
-- Chad Nelson Oak Circle Software, Inc. * * *
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk