Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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".


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: