The Case Against Autodecode

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 2 13:50:45 PDT 2016


On 06/02/2016 04:47 PM, ag0aep6g wrote:
> On 06/02/2016 10:30 PM, Andrei Alexandrescu wrote:
>> And want to return to the point where char[] is but an indiscriminated
>> array, which would take std.algorithm back to the stone age. -- Andrei
>
> I think you'd have to substantiate how that would be worse than
> auto-decoding.

I gave a long list of std.algorithm uses that perform virtually randomly 
on char[].

> Your examples only show that treating code points as characters falls
> apart at a higher level than treating code units as characters. But it
> still falls apart. Failing early is a quality.

It does not fall apart for code points.


Andrei



More information about the Digitalmars-d mailing list