What's the deal with "Warning: explicit element-wise assignment..."

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 15 10:46:11 PDT 2014


Steven Schveighoffer:

> On the left hand side, the [] operator is special *for arrays* 
> in that it denotes you want to do an element-wise copy. On the 
> right hand side, this is not the case, [] is simply an 
> operator. It's a no-op if the rhs is an array, since [] just 
> gets the array again.
>
> Requiring it simply adds unneeded hoops through which you must 
> jump,

What do you think are the reasons I suggested the enhancement for?

Bye,
bearophile


More information about the Digitalmars-d mailing list