logoalt Hacker News

jagged-chiseltoday at 2:31 AM1 replyview on HN

Pass-by-value is already a copy.


Replies

jcparkyntoday at 2:34 AM

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

show 1 reply