The Case Against Autodecode

Marc Schütz via Digitalmars-d digitalmars-d at puremagic.com
Mon May 30 08:34:39 PDT 2016


On Monday, 30 May 2016 at 14:56:36 UTC, ag0aep6g wrote:
> All this is only sensible when we move to a dedicated string 
> type that's not just an alias of `immutable(char)[]`.
>
> `immutable(char)[]` explicitly is an array of code units. It 
> would not be acceptable, in my opinion, if the normal array 
> syntax got broken for it.

I agree; most of the troubles have been with auto-decoding. In an 
ideal world, we'd also want to change the way `length` and 
`opIndex` work, but if we only fix the range primitives, we've 
achieved almost as much with fewer compatibility problems.


More information about the Digitalmars-d mailing list