[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 7365 - in trunk/subversion: include libsvn_subr libsvn_wc

From: <kfogel_at_collab.net>
Date: 2003-10-09 18:16:29 CEST

"C. Michael Pilato" <cmpilato@collab.net> writes:
> kfogel@collab.net writes:
> > julianfoad@tigris.org writes:
> > > Log:
> > > Remove "const" where it was over-zealously used on some function parameters
> > > that are passed by value. It has no meaning in the interface, and only
> > > exposes an artifact of the current implementation.
> >
> > Doesn't 'const' prevent the callee from changing the value of the
> > argument locally?
> Who cares? If you change the value of a variable passed by value, it
> doesn't affect the caller at all.

Veering dangerously close to a generic C usage discussion, but... :-)

You might care if you want to alert the programmer that a) the
variable signifies some important piece of data from the calrer, and
b) the callee's logic counts on that data remaining consistent
throughout its code.

In other words, you'd use it for the same reason you use 'const'
anywhere: to help the programmer understand how this particular code

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 9 18:51:18 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.