Why not extend array operations to full Fortran90 power ?
Kagamin
spam at here.lot
Wed Nov 16 12:24:56 PST 2011
Joachim Wuttke <j.wuttke at fz-juelich.de> Wrote:
> Compare
>
> (1) Y[] = X[]*X[];
> (2) Y[] = sin( X[] );
>
> With gdc 4.4.6,
> (1) compiles and executes as I expected, whereas
> (2) is not allowed (fails at compile time).
> Why?
>
> The semantics of (2) is unambiguous,
> and it works perfectly well in Fortran90.
> Allowing (2) would make D really attractive
> for formula-heavy mathematical work.
>
> - Joachim
Hmm... well, yeah
http://d.puremagic.com/issues/show_bug.cgi?id=3395
More information about the Digitalmars-d
mailing list