logoalt Hacker News

mrkeenyesterday at 12:46 PM2 repliesview on HN

Everything being passed by object reference just means every case is equally unclear.

  answer = frobnicate(foo)
Will frobnicate destroy foo or not?

Replies

jibaltoday at 3:06 AM

If you mean that it can modify it, you should say that. It can't destroy it as that term is generally understood.

kstrauseryesterday at 1:18 PM

No. It can’t. It can only destroy its own reference to foo, not the calling scope’s reference.

show 1 reply