Re: pass by reference



Patricia Shanahan <pats@xxxxxxx> wrote:
The issue is more critical for people for whom "pass by reference" is
familiar language. They will think they know what it means, and have to
find out somehow that it means something entirely different, when
talking about Java, that it does when talking about other languages.

Andreas Leitgeb wrote:
Why is it ok, to talk of references in Java, but have an entirely different meaning of "reference" in mind in context of the phrase
"pass by reference"?

Because Java defines "reference" in a particular way, but not "call by reference", which is an industry standard term, as I have learned here. The two terms do not depend on each other for their meaning, in the way you wish to imply.

I deduced my liberty to "redefine" "pass by ref" from Java's liberty
to redefine "reference" in the first place. My redefinition of it was coined on java's vocabulary: Objects are not passed directly
(as possible in C++, where the whole structure of the object gets
dumped on the stack), but "through use of (Java-)references".
This is natural language as I understand it.

We aren't discussing "natural" language, we are discussing technical argot.

Enough people have expressed the dangers inherit in deliberately misinterpreting "pass references by value" to mean "pass objects by reference". Those with the wisdom to appreciate the reasoning will make the distinction.

--
Lew
.



Relevant Pages

  • Re: Question on LSP
    ... not have to be explicit attributes, ... Since objects in memory usually don't move, the language can largely hide the identity mapping. ... My issue here is that whatever semantic meta model the language uses, there must be some way for the developer to unambiguously express the OOA/D is-a semantics for some problem space entity. ... Note that the language allows us to use a name like 'T' on the reference as a mnemonic so that the developer can keep track of what is happening with the indirection. ...
    (comp.object)
  • Re: Please explain the meaning of stealing a ref
    ... points of connotation as well as denotation in phrasing, and language ... clearer to _other_ readers, ... No, the use of the word 'exceptions' is anything but unreasonable, ... "Owning a reference" means being ...
    (comp.lang.python)
  • Re: Moore on Skolems Paradox
    ... >> referents for the terms in the language. ... >language" is assigning a reference to all of the terms that we learn. ... mathematics and assume that what it means in mathematics is ... If you want to imagine a world ...
    (sci.logic)
  • Re: what is the initial value of arrays of object
    ... Immutability of a reference-type base would be enforced: if any method invoked on one of these tried to change a non-transient field, a runtime exception would result, and the compiler would not accept code that assigned a reference of the base type to a reference of the new type if that reference was not the direct result of a new expression AND the base type has non-transient non-final fields. ... Would need a new keyword "delegate" and would save a lot of boilerplate typing when implementing some things using a delegate, or doing some other delegation based patterns. ... One issue here is that "delegate" is a not-uncommon variable name so the source compatibility issue is significant. ... Doing the fixed-order thing without such a language feature is possible, but difficult: the resources need GUIDs of some sort assigned, that implement Comparable, and you need an extended sort of Visitor pattern. ...
    (comp.lang.java.programmer)
  • Re: Question on LSP
    ... not have to be explicit attributes, ... the corresponding type contract using available language gears. ... single Student type. ... Reference itself is not reference. ...
    (comp.object)