The Case Against Autodecode
cym13 via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jun 2 13:22:14 PDT 2016
On Thursday, 2 June 2016 at 20:13:52 UTC, Andrei Alexandrescu
wrote:
> On 06/02/2016 03:34 PM, deadalnix wrote:
>> On Thursday, 2 June 2016 at 19:05:44 UTC, Andrei Alexandrescu
>> wrote:
>>> Pretty much everything. Consider s and s1 string variables
>>> with
>>> possibly different encodings (UTF8/UTF16).
>>>
>>> * s.all!(c => c == 'ö') works only with autodecoding. It
>>> returns
>>> always false without.
>>>
>>
>> False.
>
> True. "Are all code points equal to this one?" -- Andrei
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!”
*Sigh*
More information about the Digitalmars-d
mailing list