Hacker News new | past | comments | ask | show | jobs | submit login

The distinction between “pass by reference” and “pass by value” started with Algol, if I recall correctly, and made sense in that language, where you can declare which arguments of your function are passed in which way. It also makes sense in C++, which has a similar feature.

For other languages, I think framing parameter-passing in these terms just creates more confusion then it resolves. I would rather describe the situation like this: In Java, when you pass a mutable object (or array) to a method and the callee mutates it, the caller will see the changed version.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: