DIP76: Autodecode Should Not Throw

John Carter via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 7 15:05:07 PDT 2015


On Tuesday, 7 April 2015 at 04:05:38 UTC, Vladimir Panteleev 
wrote:
> On Tuesday, 7 April 2015 at 03:17:26 UTC, Walter Bright wrote:
>> http://wiki.dlang.org/DIP76
>
> I am against this. It can lead to silent irreversible data 
> corruption.

Sigh!

99.99% of the time when I'm processing text.... my program didn't 
create the text.

An eclectic mob of text editors driven by a herd of cats each 
having wildly different concepts of encoding wrote it.

99.999% of the time when I hit one of these cases... the 
"irreversible data corruption" is _already_ there.

Tough.

It's there, it's irreversible, I have to live with it and make 
forward progress.

Sure, on some tasks I want to know it is there.... but by far in 
most tasks all I can do is shrug, slap it to something sensible, 
and carry on.

One of the first things I had to do in D was write code to do 
this.... and it all seem way harder and slower than it needed to 
be.

(Oh for The Simple Fun Good Bad Old Days of everything is 7 bit 
ASCII... except for the funny stuff above 127 which you ignored 
anyway.)


More information about the Digitalmars-d mailing list