Re:Java is pass-by-value, Dammit (and so are Ruby and Python...
by 0wned on Sunday December 06, 2009 @08:50PM
(#980517)
I think in C++... if you want to be sure the method/function does not alter the data globally and speed is not a concern, then pass by copy. If you want the method to alter the data globally, then pass by reference. If you want speed, but don't want alteration then pass by const reference.
[ Parent
| on HN ]
There are no comments on this comment yet.