View Single Post
  #15   Spotlight this post!  
Unread 19-12-2016, 22:19
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,047
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Seeking advice for rookie programming

Quote:
Originally Posted by MamaSpoldi View Post
[*]If you already know Java, C++ is the next step in your learning process. I think the biggest mindset change is that C++ is pass by value and Java is pass by reference. This is related to pointers (indirectly) and it basically means that you cannot modify a parameter to a C++ routine unless you pass a pointer to the value.
This is not quite right - java is actually pass-by-value; when passing objects it passes the value of the reference (not the reference itself!). If you reassign a passed parameter in a java subroutine, it will not change anything outside of the subroutine.

(I've heard some object to this by arguing that it is indeed pass-by-reference, but variable assignment in java is best interpreted as name-binding. But this is not how the language specification describes it.)
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 19-12-2016 at 22:25.
Reply With Quote