NOTE: This is my first time ever looking at Elm and I just learned about its existence last week by accident.
When you update a record, are you really updating a record or just creating a new one.
> { bill | name = "Nye" }
{ age = 57, name = "Nye" }
> { bill | age = 22 }
{ age = 22, name = "Gates" }
I would expect:
> { age = 22, name = "Nye" }
Since there were two updates done on 'bill'.
Reading from the Elm language site, I know there aren't destructive updates. A new object (with the same name?) is created and shares the fields that weren't changed of the old(er) object. But from these examples, it doesn't seem like 'bill' is being updated at all. It looks more like 'bill' is being copied, that copy is being updated, and a new record called 'anonymous Will' is being created. A completely new record.
So what am I misunderstanding here?