array slicing currently does not support steps?

Paul Backus snarwin at gmail.com
Tue Aug 4 00:21:36 UTC 2020


On Tuesday, 4 August 2020 at 00:03:16 UTC, mw wrote:
> On Monday, 3 August 2020 at 23:50:45 UTC, Paul Backus wrote:
>>
>> You can use std.range.stride for this:
>>
>> http://dpldocs.info/experimental-docs/std.range.stride.html
>
> OK, good to know.
>
> But if it's built into the language syntax (as extended array 
> slicing), it will be better: more succinct, and much easier for 
> Python programmers to adopt D.

In general, D tries to avoid adding special-purpose syntax for 
things that can be easily solved with library code.


More information about the Digitalmars-d mailing list