And why I started with your ask, to use the Java spec which does not define them as you have here. My point was that we never established an agreed and consistent definition for reference.
I never once saw you pull out a definition from your sources. Even definition I had to dig for and you would deflect because it wasn't the one you wanted.
And I talked about the Java spec, which defines "references values" (abbreviated sometimes to references).
These are not references in the sense of pass-by-value, as I've demonstrated many times above.
You might claim that they're references in the sense that anything can be used to refer to something else.
But that won't get you references with the semantics required by pass-by-reference, which means that you can't claim that passing one is pass-by-reference.
Let's just imagine that they were called "oranges" -- would you be claiming that passing an "orange" gave you pass-by-reference?
If not, then it's clear that this is simply due to being confused by a name choice.
Under that definition, no passing by oranges does not have the same semantics as pass by reference.
This however changes the subject to the parameters of the functions. I have been talking about the object for which the parameter refers. Could we stick with talking about the concept I'm actually trying to get across rather than introducing a introducing a different one.
Since pass by oranges is not a term used in the Java spec, could you describe the pass by oranges semantics using spec terms?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
And why I started with your ask, to use the Java spec which does not define them as you have here. My point was that we never established an agreed and consistent definition for reference.
I never once saw you pull out a definition from your sources. Even definition I had to dig for and you would deflect because it wasn't the one you wanted.
And I talked about the Java spec, which defines "references values" (abbreviated sometimes to references).
These are not references in the sense of pass-by-value, as I've demonstrated many times above.
You might claim that they're references in the sense that anything can be used to refer to something else.
But that won't get you references with the semantics required by pass-by-reference, which means that you can't claim that passing one is pass-by-reference.
Let's just imagine that they were called "oranges" -- would you be claiming that passing an "orange" gave you pass-by-reference?
If not, then it's clear that this is simply due to being confused by a name choice.
Let's try it.
"reference values (often just oranges)"
"All interactions with objects and array is by oranges, much like pointers in C."
Yep, I'd use it.
"Objects are pass by oranges and if C had them, it too would be pass by oranges."
Ok, and does pass-by-orange have pass-by-reference semantics, or does it have pass-by-value semantics? :)
Have we defined what we are discussing as passed and the definition of reference yet?
I've done so several times.
Here is the simplest requirement, again.
When passing by reference, modifying the parameter modifies the argument.
Under that definition, no passing by oranges does not have the same semantics as pass by reference.
This however changes the subject to the parameters of the functions. I have been talking about the object for which the parameter refers. Could we stick with talking about the concept I'm actually trying to get across rather than introducing a introducing a different one.
Since pass by oranges is not a term used in the Java spec, could you describe the pass by oranges semantics using spec terms?