What's the deal with "Warning: explicit element-wise assignment..."
Kagamin via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 16 01:05:57 PDT 2014
On Tuesday, 15 April 2014 at 15:59:31 UTC, Steven Schveighoffer
wrote:
> Requiring it simply adds unneeded hoops through which you must
> jump, the left hand side denotes the operation, the right hand
> side does not
Unfortunately, this particular operation is denoted by both sides.
> Note -- it would be nice (and more consistent IMO) if arr[] =
> range worked identically to arr[] = arr.
Range or array, there are still two ways how it can work. The
idea is to give the choice to programmer instead of the compiler.
> Sorry, I had this wrong. The [] on the left hand side is
> actually part of the []= operator.
There's no such operator. You can assign fixed-size array without
slice syntax.
More information about the Digitalmars-d
mailing list