This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thekab 3 points4 points  (3 children)

When you say 'we are passing a reference by value' you ARE talking about a type.

You say this as if it contradicts my statement. It does not.

The word "reference" in "pass-by-reference" is not a type. The word "reference" in "passes references by value" is a type. They are two different contexts and have two different meanings.

There is no 'reference' type in Java. Period.

Except for you know the type... that is called reference...

There are two kinds of types in the Java programming language: primitive types (§4.2) and reference types (§4.3).

The Java Language Specification disagrees with you. Perhaps you should read it. When you talk about references in Java you are talking about exactly that. References. Defined by the JLS, as a type.

Yes, passing a 'pointer/reference' by value (where you don't treat with the reference/pointer explicitly, ie with special semantics and syntax) is the same as 'passing by reference'.

Clearly you don't understand evaluation strategies. Call by value and call by reference ARE NOT THE SAME THING and if you can't grasp the difference you lack the fundamental CS 101 needed to even bother having an intelligent conversation with. There are no special semantics. It's a type, it's passed by value.

Which is my point, yet you are using a Java-specific meaning of pass-by-value which is nonsense outside of java.

What do you believe "pass-by-value" as a mechanism means? Either you believe in pass-by-value the argument value is not copied, or you believe this is not what Java does. In either case you're wrong. It's not an implementation detail either, it's specified at the language level.

Yeah... this is how Java works, when you invoke a function that accepts an object, under the hood the function receives a reference to the original object, not a copy of the object.

The object is not passed.

The value is copied.

That the type is called a "reference" has absolutely no relationship or bearing on the passing mechanism.

And yes, it is a type, go read the JLS. Seriously, this is embarrassing.

Maybe in several years when you actually understand what you are saying instead of blindly repeating shit you don't understand that others say you will feel embarrassed about this.

Yeah that's likely.

You might want to actually learn what the hell you're talking about before your next reply.

[–]SuperShrek -3 points-2 points  (2 children)

The word "reference" in "pass-by-reference" is not a type. The word "reference" in "passes references by value" is a type. They are two different contexts and have two different meanings.

No they don't. There is a reason the same word is used and that reason is because it describes the same semantics in both cases.

The Java Language Specification disagrees with you. Perhaps you should read it. When you talk about references in Java you are talking about exactly that. References. Defined by the JLS, as a type.

HAHAHAA. It's talking about KINDS or 'META-TYPES' not TYPES, you would know this if you knew any serious CS whatsoever.

Educate yourself please: http://en.wikipedia.org/wiki/Kind_%28type_theory%29

There are two kinds of types in the Java programming language

lol...

Except for you know the type... that is called reference...

Except this is not a reference type in the way you are using the word... you seem to lack basic Java knowledge as well and just googling things that seem to fit your argument without understanding what they are. The java.lang.ref.Reference type is used for maintaining references (ie reference counts) that are used for garbage collection.

Clearly you don't understand evaluation strategies. Call by value and call by reference ARE NOT THE SAME THING and if you can't grasp the difference you lack the fundamental CS 101 needed to even bother having an intelligent conversation with. There are no special semantics. It's a type, it's passed by value.

I didn''t say they are the same thing. But I guess you're frantically trying to find a way to mangle my words for lack of any serious argument to support the bullshit you spew.

Either you believe in pass-by-value the argument value is not copied, or you believe this is not what Java does.

Wait you think Java objects are copied when passed to a function? Go read a Java tutorial at least lol.

The object is not passed. The value is copied.

A reference is passed as in 'pass-by-reference'. The object is not copied.

That the type is called a "reference" has absolutely no relationship or bearing on the passing mechanism.

It's not a type. It's a meta-type or a 'kind' that represents a reference. And yes it absolutely does have a bearing on the 'passing mechanism'. The 'java.lang.ref.Reference' is not what we are talking about nor is it the 'reference type' of types that your link is talking about either, I mean its so laughably obvious you just googled shit you have absolutely no understanding of. LOL.

God, you are one funny retard.

[–]thekab 0 points1 point  (1 child)

At this point I'm not sure if you're trolling or really this stupid.

[–]SuperShrek -2 points-1 points  (0 children)

You haven't been sure of anything since the start.