array operations enhancements
Kagamin
spam at here.lot
Thu Aug 19 07:35:48 PDT 2010
Don Wrote:
> ponce wrote:
> > pure double anyfunc(ref double x) { ... }
> >
> > pure double anyfunc(double[]) { ... }
> >
> > double[] c = anyfun(a[]) + 2.0*b[];
> >
> >
> >
> > This proposal could be nice for making array operations more useful, but complicates overloading.
> Related example:
>
> double [] c = anyfun(a[]) * b[];
>
> Is this element-wise using the first function, or scalar multiplication
> using the second?
Just report the ambiguity error.
More information about the Digitalmars-d
mailing list