[freetds] warnings, again (was: Re: going 64!)
James K. Lowden
jklowden at freetds.org
Tue Dec 18 14:00:39 EST 2007
Christos Zoulas wrote:
> The gcc warnings are geared towards the majority of the programmer
> population. All I can say is that I've met quite a few programmers
> that did not know the precedence of && and ||.
I'm sure you deal with more C coders than I do, and I don't doubt your
experience. It boils down to a kind of "reasonable man" argument: how
much knowledge of operator precedence is it reasonable to assume? Because
you surely wouldn't write:
a = (b + c);
or a = (++b);
You prefer to defer to the compiler writers because they have more
information about what confuses people, and because their choices conform
to your experience. I think that's reasonable. On another project I
might do the same. I'm not always a crank.
But when I find extra parentheses, I look more closely to see what's going
on. Is it:
1. Something unusual? (I hope so.)
2. A bug?
3. Expressing only what the compiler would do without them?
I have to examine #1 and #2 carefully before I conclude #3. I can't be
the only one.
I would prefer to remove #3 from the problem domain. I think that's
reasonable, too. Even if that means befuddling the less knowledgeable,
who need to learn (and will). After all, it was hard to write. It should
be hard to read, too.
I have to conclude that reasonable people can disagree on this point, else
I'd have to conclude I'm being unreasonable.
Fianlly, to both of you, and to others who've contributed what little
light this discussion has generated: thanks for reminding me FreeTDS is
compiled in many different environments and that its portability is an
asset to you. I think "builds anywhere, runs anywhere" is a worthy goal
for the project. Your participation furthers it.
More information about the FreeTDS