logoalt Hacker News

jcparkyntoday at 2:34 AM1 replyview on HN

It's only semantically a pass-by-value, in reality a reference is passed and the data is only copied if needed (i.e. value is mutated while shared).


Replies

zahlmantoday at 3:23 AM

So the language has reference semantics, and (per the edit) for every object (like in Python)?

(Ah, no, your example elsewhere in the thread suggests that the referred-to structures get implicitly copied all over the place.)

show 1 reply