|
|
|
|
|
by rtpg
1290 days ago
|
|
It's really the same problem extended to attributes of Data. The "immutability" in Data _also refers to the reference_. To take Python tuples (which are morally pretty close to Data) my_data = ([],false)
my_data[0].push(1)
tuples are immutable, but this happens, because the "immutability" is in the same vein as JS's const: "we are always pointing to the same object". |
|