getting rid of immutable (or const)

Kagamin spam at here.lot
Fri Sep 6 08:47:07 UTC 2019

On Thursday, 5 September 2019 at 12:46:06 UTC, berni wrote:
> OK. This are two solutions and although I'll probably not going 
> to use any of those (due to other reasons), I still don't 
> understand, why the original approach does not work. If I've 
> got a book an put it in a box and later I'll get it out again, 
> it's still the same book. So why has a struct changed when I 
> put it into an AA and get it out again? It's not supposed to 
> change...

Physical objects work like reference types. A place on bookshelf 
is at one coordinate and a book is at another coordinate, you 
don't copy the book, you fill a place on bookshelf with a 
reference to the book.

More information about the Digitalmars-d-learn mailing list