Pedants

J

jacob navia

Richard said:
It would seem that not only does Heathfield see himself as some kind of
elder statesman and C god, he also sees himself as judge an jury. If a
day could go buy without him telling people (even Chuck) when to
apologise and to whom then the better for this group. The mind boggles
at his own self perceived importance.

*his own self perceived importance*

It is one of the things that I really can't stand. I can
accept that he likes C89, uses a gcc version from the last
century, whatever. Those are just "technical details".

What I can't stand are those sentences where he believes
that he is such a half god, exactly as you say.


Well Mr Heathfield:

And then, once you have worked out why you are wrong, please do the
necessary.
 
J

Joachim Schmitz

jacob said:
Well Mr Heathfield:

And then, once you have worked out why you are wrong, please do the
necessary.
Go by your own standards first. I'm still awaiting an apology for having
been called a liar by you after I stated that gcc is not a fully conformant
C99 compiler, not even when called with -std=C99.

The GCC folks are quite open about it, check
http://gcc.gnu.org/c99status.html, if you still don't believe it.


Bye, Jojo
 
R

Richard

Joachim Schmitz said:
Go by your own standards first. I'm still awaiting an apology for having
been called a liar by you after I stated that gcc is not a fully conformant
C99 compiler, not even when called with -std=C99.

The GCC folks are quite open about it, check
http://gcc.gnu.org/c99status.html, if you still don't believe it.


Bye, Jojo

This is usenet, not a gentlemen's club. There will be no pistols at
dawn. This is the ONLY group I have ever seen people demanding apologies
and then harping on about it years later. People get things wrong all
the time. Some (read: Chuck) more than others. It's a fact of lie.
 
K

Kenny McCormack

Richard said:
This is usenet, not a gentlemen's club. There will be no pistols at
dawn. This is the ONLY group I have ever seen people demanding apologies
and then harping on about it years later. People get things wrong all
the time. Some (read: Chuck) more than others. It's a fact of lie.
^^^ (?)

There is a lot about this ng that is unique (IM [not exactly limited] E) on
Usenet. The totally bizarre rules (which expressly make everything that
might be on-topic off-topic - except, of course, for how to prototype
main() and the adviseability of casting the return value of malloc()),
combined with all the games-playing, have totally warped the
participants here.

I was just reading some posts by CBF over in rec.games.bridge, and was,
quite frankly, amazed at how sensible/rational his posts there are
(Marty Ambulance - the other clc/rgb poster [besides me] - is, of
course, as loony there as he is here - you can't have everything...).

P.S. Interesting typo above...
 
R

Richard

Richard said:
This is usenet, not a gentlemen's club. There will be no pistols at
dawn. This is the ONLY group I have ever seen people demanding apologies
and then harping on about it years later. People get things wrong all
the time. Some (read: Chuck) more than others. It's a fact of lie.
^^^ (?)

There is a lot about this ng that is unique (IM [not exactly limited] E) on
Usenet. The totally bizarre rules (which expressly make everything that
might be on-topic off-topic - except, of course, for how to prototype
main() and the adviseability of casting the return value of malloc()),
combined with all the games-playing, have totally warped the
participants here.

I was just reading some posts by CBF over in rec.games.bridge, and was,
quite frankly, amazed at how sensible/rational his posts there are
(Marty Ambulance - the other clc/rgb poster [besides me] - is, of
course, as loony there as he is here - you can't have everything...).

P.S. Interesting typo above...

As a reg yourself it was your duty to point it out and fake complete
confusion about what it means :-;
 
S

Serve Lau

user923005 said:
For testing software and describing problems, there is *nothing*
better than a pedant.

I disagree totally. I have had a pedant as code reviewer and he always got
stuck in language issues never finding real bugs. Things like I wasnt
allowed to declare variables in the middle of a function or write NULL or 0.
The software never got better
 
A

Antoninus Twink

Serve Lau said:

That's a genuine portability bug. If portability is a concern to your
project, he is right to point it out.

By exactly the same reasoning, you should cast the return value of
malloc() since this is required for portability to C++. But of course,
that and doesn't help in your ongoing campaign to undermine the current
C standard.
 
U

user923005

I disagree totally. I have had a pedant as code reviewer and he always got
stuck in language issues never finding real bugs. Things like I wasnt
allowed to declare variables in the middle of a function or write NULL or 0.
The software never got better

You have to learn how to use your pedant properly.
 
S

santosh

Antoninus said:
By exactly the same reasoning, you should cast the return value of
malloc() since this is required for portability to C++.

Portability only applies within a particular language. You cannot have
code that is portable across C, C++, Fortran, COBOL, BASIC and whatnot.

<snip>

Currently C++ is diverging from C, and wherever possible, it's better to
write in either C or C++, not in a complicated mixture of both.
 
K

Kaz Kylheku

By exactly the same reasoning, you should cast the return value of
malloc() since this is required for portability to C++.

The problem is that other things are required for portability to C++,
like for example avoiding the use of C++ keywords as identifiers.

Casting malloc is just fine.

In fact, it's useful in a C compiler to have C++-style type checking
for void *: that is to say, implicit conversions from void * to some
other pointer type being diagnosed.

If you have this warning and turn it on, it will generate false
positives in every place where you have not cast the return value of
malloc.

The rationale for /not/ casting malloc is outdated, based on the idea
that compilers allow functions to be called without a prior
declaration, without issuing a diagnostic.

Whether or not the code is to be portable to C++ has to be a project-
level decision. Either you decide to do it, and you do it correctly
and thoroughly, or you don't do it at all.

As a superior pedant, upon seeing interspersed declarations and
statements, I would raise the question: what is the project's policy
regarding the language dialect that is used?

If the project's policy dictates that the project is in C89, then the
usage is in violation of that policy.

Moreover, it's possible that the construct is only accepted because
the compiler is in fact operating in a non-conforming extension mode
superimposed over the C89 dialect. It could be the project's policy to
use that compiler's dialect, or it could be unintentional: namely that
nobody had the presence of mind to configure the compiler to standard-
conforming mode. That could be a problem, because in that case,
unintentional uses of extensions can creep in---including extensions
which are uncommon, or in fact not found in any other compiler.

Code reviewers have to look not only for bugs, but for adherence to
coding conventions (and be pedantic about that just as much as
language issues). They have to discover unclear and inconsistent
policies also.
 
K

Kaz Kylheku

I disagree totally. I have had a pedant as code reviewer and he always got
stuck in language issues never finding real bugs.
[ snip ]
 Things like I wasnt allowed to declare variables in the middle of a
function
[ snip ]
or write NULL or 0.

Your reviewer disallows the use of NULL and zero?  Huh?

I suspect this was supposed to be ``write NULL for 0''. For instance:

int x = NULL;

If this is in fact the case, the pedant is right to flag this idiocy.
 
S

Serve Lau

Richard Heathfield said:
That's a genuine portability bug. If portability is a concern to your
project, he is right to point it out. (And if portability is not a concern
to your project, you might want to think about why not.)

yes I thought about portability when declaring variables in the middle of a
function and decided to do it. That makes it all the more frustrating when
you have to discuss it again. On top of that, we're switching to Python soon
anyway :p
Fine, so fix those things and then get him to review it again. If he
really
is a pedant, he'll find some of your real bugs. So if he doesn't find any
real bugs, sack him and hire someone more pedantic.


That is because you weren't using your pedant properly. Minor problems are
a distraction.

No thats too easy. These things easily add up to weeks of extra works
because almost every change needs testing too. I prefer to deliver my code
on time instead of constantly changing relatively unimportant things
 
C

CBFalconer

Serve said:
I disagree totally. I have had a pedant as code reviewer and he
always got stuck in language issues never finding real bugs.
Things like I wasnt allowed to declare variables in the middle of
a function or write NULL or 0. The software never got better

Well, you _aren't_ allowed to declare variables in the middle of a
function without C99. You _are_ allowed to write both NULL and 0.
:)
 
S

Serve Lau

CBFalconer said:
Well, you _aren't_ allowed to declare variables in the middle of a
function without C99. You _are_ allowed to write both NULL and 0.

yes and since C99 is also C and there is nothing in the coding standards
that mentions that you *must* use C89 its legal.
 
S

Serve Lau

Richard Heathfield said:
I prefer to get the relatively unimportant things right to start with, so
as to avoid wasting my pedant's time on trivia. For example, if I make my
main return int rather than void, that's ten seconds the pedant doesn't
have to spend telling me to fix it. Iterate that philosophy through all
trivial problems, and the result is that the pedant can spend all that
saved time telling me the *important* things that are wrong with my code.

A little care up front, and everyone wins.

Using 0 instead of NULL is a matter of opinion though, its both correct.
The readability of declaring 3 ints on 1 line or on 3 is opinion.
It has nothing to do with care. If a pedant starts worrying about that,
maybe he should rewrite the code himself. Dont let people write code just to
please a pedant.
 
K

Keith Thompson

Serve Lau said:
The compiler would have flagged that long before it arrives there if
NULL is defined as ((void *)0)

Yes, but if NULL is defined as 0 it will never flag it.

(I've actually seen NULL used where '\0' would be more appropriate.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top