ndslice: feature deprecation voting / discussion

Manu via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 2 20:04:31 PDT 2016


On 3 October 2016 at 00:02, Ilya Yaroshenko via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> Timothee Cour proposed to deprecate arguments without [ ... ] that represent
> shape .
>
>   auto a0=iota(3*4).sliced(3,4); // proposal:deprecate
>   auto a1=iota(3*4).sliced([3,4]);
>   auto a2=iotaSlice(3,4); // proposal:deprecate
>   auto a3=iotaSlice([3,4]);
>   auto a6=slice!int(3,4);// proposal:deprecate
>   auto a4=slice!int([3,4]);
>
>   ... the same for blocks, windows, ... etc.
>
> Mir Issue: https://github.com/libmir/mir/issues/337
>
> Current Yes: Timothee Cour, John Colvin
> Current No : Ilya Yaroshenko, Relja Ljubobratovic
>
> If you want to see the code please use Phobos code (not Mir). Template bloat
> was significantly reduced in https://github.com/dlang/phobos/pull/4823.
>
> Ilya


Why?

Isn't this what f(T[] shape...) template syntax is for? Ie, supports
both syntax with the same instantiation?
(https://dlang.org/spec/function.html#typesafe_variadic_functions)


More information about the Digitalmars-d mailing list