Struct immutable data and dict

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 5 20:15:11 PDT 2016


On Thursday, 6 October 2016 at 03:05:18 UTC, Patric Dexheimer 
wrote:
> But why i´m overwriting the struct if its the first time i´m 
> putting it there? (like on the array).

The compiler doesn't know it is the first time (it doesn't follow 
the data from creation, it just looks at that individual line, 
and first time write is no different than later writes with the 
associative array index, whereas array append is different so it 
can tell).


More information about the Digitalmars-d-learn mailing list