I would vote for an improved nested record update.
person.pet
is unambiguous to me. It refers to the value in the field pet
of person
.
{ person.pet | name = "Fifo"}
should by the same token refer to an updated version of the record in person.pet
.
If this becomes supported, { person | pet = { person.pet | name = "Fido" } }
becomes valid and I don’t think it is all that hard to understand. I would take this over the proposed alternative any day of the week.
I do concede that :P
has its charm.