dupping to allow vector operation?

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Oct 9 11:48:56 PDT 2014


Marc Schütz:

> It's equivalent to:
>
>     int[] tmp = a1[] * 3;
>     int[] a4 = tmp.dup;
>
> The first part is of course identical to line 3, so this should 
> be an error, too. Normal rules for evaluation order require 
> `a1[] * 3` to be evaluated before `(...).dup`, so where is it 
> supposed to store the intermediate result?

So do we need a new different syntax to do it? :-)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list