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

Re: SVN type concerns

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2001-02-22 20:34:18 CET

Jim Blandy <jimb@zwingli.cygnus.com> writes:
> > While working in the FS code, I noticed that there are several
> > question functions with return values of 'int' as opposed to the
> > (IMHO) more semantically accurate 'svn_boolean_t'. Any comments about
> > this sort of thing? I'm tempted to blast through there and change
> > them, but am willing to live with it if there is a sound reason behind
> > the status quo.
> It's all the functions, in fact. I just said to Karl on the phone,
> essentially, "The reason behind the status quo is that y'all are
> right, and I'm wrong, but I will revert any change that introduces
> svn_boolean_t into the filesystem, because I am an asshole."


> [...]
> That explained, I'm going to back off, and say that, as long as folks
> understand that I honestly believe it makes the code less readable, if
> you all really think that svn_boolean_t is the best way to go, I won't
> fight it any more.

I definitely find that svn_boolean_t makes code more readable for me;
I think cmpilato and a few others feel the same way.

Perhaps this would logically mean that Jim should use svn_boolean_t in
his code, and we should use ints, because after all, readability is
most important for those who aren't intimately familiar with the code.

However, that would be silly. :-)

Consistency in this relatively minor matter is not very important,
IMHO not nearly important enough to require resolution or a vote or
something. Let's just do this: Jim use ints, and we'll use
svn_boolean_t's. A person tends to spend the most time reading their
own code, so this works out well.

Of course, if you have the sense that you're making changes in an area
of code that is more or less "owned" by someone else, try to stick to
their style. For example, if I were to edit node-rev.c, I wouldn't
start using svn_boolean_t in code that otherwise uses int. But
likewise, I'd expect to see svn_boolean_t in editor.c.

Received on Sat Oct 21 14:36:23 2006

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.