<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 23 September 2017 at 03:11, Ilya Yaroshenko via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Should we add `a * b` to ndslice for 1d vectors?<br>
Discussion at <a href="https://github.com/libmir/mir-algorithm/issues/91" rel="noreferrer" target="_blank">https://github.com/libmir/mir-<wbr>algorithm/issues/91</a><br>
</blockquote></div><br></div><div class="gmail_extra">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.</div><div class="gmail_extra">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.</div></div>