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.
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
On Aug 18, 10 14:41, F. Almeida wrote:
It is an excellent feature of D2 that one can do
double a[];
double b[];
double c[];
//...
c = a[] + 2.0*b[];
But this is still limited, as we cannot include function calls in
these operations.
What if the compiler was able to introduce them in the
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
== Quote from KennyTM~ (kenn...@gmail.com)'s article
On Aug 18, 10 14:41, F. Almeida wrote:
What if the compiler was able to introduce them in the
assignment
loop, provided that the functions pass ref double (in this
case)?
double anyfun(ref double x) { ... }
c = anyfun(a[]) +
F. Almeida wrote:
It is an excellent feature of D2 that one can do
double a[];
double b[];
double c[];
//...
c = a[] + 2.0*b[];
But this is still limited, as we cannot include function calls in
these operations.
What if the compiler was able to introduce them in the assignment
loop,