Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Java & OpenOffice --
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  Halo steals agin? Post :: Post Login Problem  View next topic  
Author Message
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Mar 30, 2005 5:09 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Quote:
2) Lack of structs (as cyan pointed out)


structs are just classes with everthing public, which is quite possible in Java
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed Mar 30, 2005 7:43 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Cerium wrote:
For the record...

Everything in java is passed by value, nothing is passed by reference.

Objects are essentially pointers. When you pass an object to a function, youre passing the reference to that object by value.


In that case, even in C++, there is no such thing as by reference. References are essentially pointers. When you pass a reference to a function, you're passing the pointer to that object by value.

You're wrong tongue.gif
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Wed Mar 30, 2005 8:20 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

I was under the impression that basically every object in code is actually a pointer to a real instance.
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Mar 30, 2005 8:41 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Well, you can't very well typedef in ASM.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Wed Mar 30, 2005 11:39 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Dr Brain wrote:
In that case, even in C++, there is no such thing as by reference. References are essentially pointers. When you pass a reference to a function, you're passing the pointer to that object by value.


The difference is in C/Cpp you have a choice, Java you do not. (Aside from the copy() method, assuming its been overloaded by the object in question.)

Although, in Java 5, the lines are a bit more blurred as primitives are auto boxed and unboxed now, making a 'by ref' style primitive easier to setup.

Dr Brain wrote:
You're wrong tongue.gif

Umm... I was indirectly quoting two sources: One of my CS professors and a Java tutorial written by Sun. Interpret it how you will, but thats how it works.



Bak wrote:
structs are just classes with everthing public, which is quite possible in Java


One word: Bitfields.
Can be done in Java, just requires more work from the developer.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Mar 31, 2005 12:14 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

You said everything was pass by value. That's wrong. Pass by value has a meaning, a meaning which passing by reference does not fulfill.

You're correct that in Java, everything is references, but you're wrong about everything else.

I'm afraid I have very little respect for the views of CS professors. My current CS class has the professor deferring to me on all technical Java questions.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Thu Mar 31, 2005 11:44 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Then I feel sorry for your CS class...

www.google.com
+Java +"By Reference"

First three results:
- http://www.yoda.arachsys.com/java/passing.html
- http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html
- http://www.jguru.com/faq/view.jsp?EID=430996

Not the exact document(s) I read a while back, but all clearly state what Ive said twice now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Mar 31, 2005 11:49 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

java passes by value -> copy of the reference. (see below by dr brain)

public void blah(int []a) {
a = new int[3];
}

meaning the address of 'a' is locked, it wont be changed. etc. etc.
_________________
Performance is often the art of cheating carefully. - James Gosling


Last edited by CypherJF on Thu Mar 31, 2005 12:39 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Mar 31, 2005 12:08 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Cerium, do you have any fucking clue how passing by reference works in C++? How about passing by reference in Java? It's the same (allowing for the fact that C++ objects don't alway get allocated on the heap). Passing by reference is different than passing by value.

Passing by value means something. Passing by reference means passing a pointer to an object to a function. Passing by value MEANS passing a copy of that object to the functions. Notice that they are not the same thing. The keyword is copy. Java passes copies of the underlying pointers, yes, but no copy of the object is made.

Please, do yourself a favor, learn the difference.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Guest



Offline

PostPosted: Thu Mar 31, 2005 12:37 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

CypherJF wrote:
java passes by value -> copy reference. (see below by dr brain)

public void blah(int []a) {
a = new int[3];
}

meaning the address of 'a' is locked, it wont be changed. etc. etc.
Back to top
Cerium
Server Help Squatter


Age:43
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Thu Mar 31, 2005 12:41 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Dr Brain wrote:
<insert internet anger here>


Look guy, dont be mad at me. Im well aware of the difference between the two, youre the one who seems confused.

Continue to argue semantics all you want. Java passes by value always. If you want to use the term 'by ref' whenever you pass an object reference to a function (notice how redundant that sounds?) feel free. But Im not going to continue debating this. Think Im a dumbass for all I care. Youre only hurting yourself.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Mar 31, 2005 2:33 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

yawn that guest was me, i accidentally quoted instead of actually reading... i thought i was logged in and was clicking edit tongue.gif haha
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Thu Mar 31, 2005 5:54 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Yeah it definately passes by reference.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Mar 31, 2005 11:29 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Umm, right. Java passes the pointers by value, the objects by reference. It's just different ways of looking at it. No matter what you're passing by whatever means, you're always passing some value.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
SamHughes
Server Help Squatter


Joined: Jun 30 2004
Posts: 251
Location: Greenwich
Offline

PostPosted: Fri Apr 01, 2005 12:43 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Arguments get depressing when all that's left to discuss is terminology. Stop worrying about Java and C++; they are both ugly languages anyway. Go learn some Haskell and reconnect with your inner child.
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Apr 01, 2005 2:46 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

ADA ALL THE WAY!
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Fri Apr 01, 2005 6:53 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

BrainF*ck is interesting
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 278 page(s) served in previous 5 minutes.

phpBB Created this page in 0.642464 seconds : 41 queries executed (81.1%): GZIP compression disabled