
9 Feb
2006
9 Feb
'06
10:02 p.m.
me22 wrote:
On 2/9/06, Pavel Antokolsky aka Zigmar <zigmar@gmail.com> wrote:
When pointer passed it immediately indicates that variable might be modified as opposite to non-const reference, which is a rare beast nowadays. If you think of foo(someVar) via foo(&someVar), the second hints about possibility of modifying someVar, while first one doesn't.
That sounds like a local convention to me. Actually it sounds like something a C programmer would think to me. Why pass anything by pointer unless you have to?
To me, non-const reference means output
Me too.
while a pointer means that the method will be taking ownership of that pointer.
Well, it's a possibility, but again not necessarily global law I think. j