array operation a[] + b[] not implemented??
Trass3r
un at known.com
Sun Jan 17 17:22:20 PST 2010
> As a side note, why isn't this allowed? It seems like a perfectly
> reasonable thing to have:
>
> float[] c = a[] + b;
>
Can't think of any point against it as well.
Add
writeln(a[] + b[])
as a case where one would expect a new array to be created.
> Also, see bug 2549
> (http://d.puremagic.com/issues/show_bug.cgi?id=2549). If for
> some reason we don't allow the creation of new arrays using array ops,
> we need to fix the error detection.
>
Yeah, it's strange that something like
writeln(a[] * 4.f + 1.f);
or
writeln(a[] * b[]);
gives the described access violation, while
writeln(a[] + b[]);
yields Array operation not implemented.
More information about the Digitalmars-d
mailing list