Y
Hacker News
new
|
ask
|
show
|
jobs
by
robzyb
3342 days ago
I didn't know the answer, but I just did a bit of Googling to determine that one of the reasons that pass-by-value can be preferred is because it makes life easier for the garbage collector.
See golang escape analysis:
http://www.agardner.me/golang/garbage/collection/gc/escape/a...