On 6/23/20 5:15 AM, WebFreak001 wrote:
I have the following code:
double[string] foo;
foo["a"] += 1;
how is the opOpAssign on the AA defined? Is it defined to set the value
to the value to the right of the opOpAssign if it isn't set for
primitives or does it add the given value onto
On Tuesday, 23 June 2020 at 09:15:57 UTC, WebFreak001 wrote:
[...]
it will give me a range violation at runtime and not init it
for me at all.
There is `aa.require("a", Foo.init) += 4;` now which solves
this, but I would prefer having the small simple syntax well
defined for all types inste
I have the following code:
double[string] foo;
foo["a"] += 1;
how is the opOpAssign on the AA defined? Is it defined to set the
value to the value to the right of the opOpAssign if it isn't set
for primitives or does it add the given value onto T.init?
Doing
foo["b"]++;
gives m