The Case Against Autodecode

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 2 13:34:25 PDT 2016


On 02.06.2016 22:29, Andrei Alexandrescu wrote:
> On 06/02/2016 04:22 PM, cym13 wrote:
>>
>> A:“We should decode to code points”
>> B:“No, decoding to code points is a stupid idea.”
>> A:“No it's not!”
>> B:“Can you show a concrete example where it does something useful?”
>> A:“Sure, look at that!”
>> B:“This isn't working at all, look at all those counter-examples!”
>> A:“It may not work for your examples but look how easy it is to
>>     find code points!”
>
> With autodecoding all of std.algorithm operates correctly on code
> points. Without it all it does for strings is gibberish. -- Andrei

No, without it, it operates correctly on code units.


More information about the Digitalmars-d mailing list