shouldn't this throw ? iota(5).sliced(2,2)

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 6 22:39:12 PST 2016


On Thursday, 7 January 2016 at 04:47:16 UTC, Timothee Cour wrote:
> what's the rationale for:
> Range length must be greater than or equal to the sum of shift 
> and the
> product of lengths
> instead of:
> Range length must be equal to the sum of shift and the product 
> of lengths
> ?
>
> It seems more lax and bug-prone.

std.ndslice will contain a module or few for allocations, script 
like code, and concatenations. User defined range may not have 
slicing, but must be able to be used with `sliced` multiple times 
with different lengths.
-- Ilya


More information about the Digitalmars-d mailing list