Why not flag away the mistakes of the past?
Guillaume Piolat
notthat at email.com
Thu Mar 8 16:34:11 UTC 2018
On Wednesday, 7 March 2018 at 13:24:25 UTC, Jonathan M Davis
wrote:
> On Wednesday, March 07, 2018 12:53:16 Guillaume Piolat via
> Digitalmars-d wrote:
>> On Wednesday, 7 March 2018 at 06:00:30 UTC, Taylor Hillegeist
>>
>> wrote:
>> > That way the breaking change was easily fixable, and the
>> > mistakes of the past not forever. Is it just the cost of
>> > maintenance?
>>
>> auto-decoding problem was mostly that it couldn't be @nogc
>> since throwing, but with further releases exception throwing
>> will get @nogc. So it's getting fixed.
>
> I'd actually argue that that's the lesser of the problems with
> auto-decoding. The big problem is that it's auto-decoding. Code
> points are almost always the wrong level to be operating at.
> The programmer needs to be in control of whether the code is
> operating on code units, code points, or graphemes, and because
> of auto-decoding, we have to constantly avoid using the range
> primitives for arrays on strings. Tons of range-based code has
> to special case for strings in order to work around
> auto-decoding. We're constantly fighting our own API in order
> to process strings sanely and efficiently.
I'd agree with you, hate the special casing. However it seems to
me this has been debated to death already, and that auto-decoding
was successfully advocated by Alexandrescu and al; surviving the
controversy years ago.
More information about the Digitalmars-d
mailing list