News for hackers. Stuff that matters.
Re:Reasons Python Sucks by twblalock on Tuesday December 18, 2018 @07:59PM (#18712099)
Java passes by value. The value being passed happens to be a copy of a pointer (properly called a "reference" in the spec, which confuses people). A copy of a pointer points to the same place as the original pointer. For normal use cases this works very well.

However, if you reassigned your copy of a pointer in the body of a function, the original pointer would still point to the same place it did before the function was called.

That's not the same thing as actual pass-by-reference in languages like C++.

There are no comments on this comment yet.