|
-
March 29th, 2013, 02:29 AM
#14
Re: Modifying an existing array with a function
 Originally Posted by GeoRanger
This is only my opinion and I know a lot of people, including the designers of the STL, disagree with me but I think references are vastly overused. In most cases, all they are doing is hiding a pointer so the programmer doesn't have to explicity use * and ->.
Well, the designers of Java agree with you. In Java there's no by-reference parameter passing at all. It's always by-value (like in C). And the syntax is adapted to this so there's no notion of pointer either. References in C++ were introduced primarily to support operator overloading which is not available in Java.
So the problem is you cannot have the versability of C++ without the complexity. You either must learn to live with it (using a coding standard helps), or you must switch to something simpler like Java.
Last edited by nuzzle; March 29th, 2013 at 03:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|