shuffle a character array

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 20 10:31:18 PDT 2016


On 07/20/2016 09:44 AM, ketmar wrote:
> On Wednesday, 20 July 2016 at 13:33:34 UTC, Mike Parker wrote:
>> There is no auto-decoding going on here,
> ...
>
>> as char[] and wchar[] are rejected outright since they are not
>> considered random access ranges.
> ...due to autodecoding.

I think both not being random access ranges and there is auto-decoding 
in Phobos are design decisions due to the fact that char[] is a 
multi-byte encoding.

Phobos could choose not to auto-decode but char[] would still be 
multi-byte, making it impossible to access randomly.

Ali



More information about the Digitalmars-d-learn mailing list