"tuple unpacking" with zip?

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 21 23:17:04 PDT 2015


On 21-Oct-2015 20:35, Jacob Carlborg wrote:
> On 2015-10-21 16:13, Shriramana Sharma wrote:
>
>> Why is it a mistake? That seems a very sane thing, although somewhat
>> quirky.
>> Since ElementType is a Range primitive, and apparently iterating
>> through a
>> string as a range will produce each semantically meaningful Unicode
>> character rather than each UTF-8 or UTF-16 codepoint, it does make
>> sense to
>> do this.
>
> The short answer is: it's not 100% correct, it's slower and not always
> needed.
>

Allow me to correct it to:
- decoding alone often is not enough
- it's slow
- in many cases not decoding is possible and fast

Therefore many std.algo things would avoid decoding behind the scenes.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list