March 19, 2018
On Thursday, 15 March 2018 at 14:13:25 UTC, jmh530 wrote:
> On Thursday, 15 March 2018 at 12:49:22 UTC, jmh530 wrote:
>> [snip]
>>
>> It looks like it should expand the alias earlier. No problem with auto foo (T)(S!(1, T) v) {};
>
> Also, this issue also shows up in mir.ndslice.traits. I had to do the equivalent of isV below. It doesn't work to do the alternate version. However, given that you have the traits, then you can use them in a template constraint. So you have to repeat yourself in the trait once, rather than bunches of times in each function that calls them.
>
> enum bool isV(T) = is(T : S!(1, U), U);
> enum bool isV_alternate(T) = is(T : V!(U), U);

This does not help in practice because ndslice has an alias this primitive to be implicitly convertible to const version.

For example for array one can write:

auto foo(T)(const(T)[] ar) {}

And this would work with double[] and immutable(double)[] as well. The same true for ndslice:

auto foo(T)(Slice!(Contiguous, [1], const(T)*)[] ar) {}

It is very important to do not create additional institutions for numeric code because usually it is quite heavy.

I don't know DMD internals. How the  aliasing issue can be solved?

Best regards,
Ilya
March 20, 2018
On Tuesday, 13 March 2018 at 03:37:36 UTC, 9il wrote:
> I have a lot of work for next months, but looking for a good opportunity to make Mat happen.

Sounds great. In which repo will these changes happen?
September 10, 2018
On Tuesday, 20 March 2018 at 12:10:08 UTC, Nordlöw wrote:
> On Tuesday, 13 March 2018 at 03:37:36 UTC, 9il wrote:
>> I have a lot of work for next months, but looking for a good opportunity to make Mat happen.
>
> Sounds great. In which repo will these changes happen?

It is planned to be in mir-algorithm, though
1 2 3 4 5
Next ›   Last »