Should we add `a * b` for vectors?

Manu turkeyman at
Sun Sep 24 05:24:57 UTC 2017

On 23 September 2017 at 03:11, Ilya Yaroshenko via Digitalmars-d <
digitalmars-d at> wrote:

> Should we add `a * b` to ndslice for 1d vectors?
> Discussion at

I often ponder this sort of question... and while the nerdy bit of my would
love to see this, I can never get past the fact that `is(typeof(a) !=
typeof(a * b))`... I feel that's a big enough reason to put a bullet in the
idea. D has array operations, which look just like 1d ndslices, also SIMD
vectors usually implement operators, but they do element-wise operation, so
now there's a confusion.
Consider, a generic function receives some T; if T is a slice or simd, it
does element-wise stuff, if T is an ndslice, it behaves differently. That
doesn't seem right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Digitalmars-d mailing list