httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <>
Subject Re: I *don't* want Paul's style guide.
Date Mon, 01 Jul 1996 18:05:13 GMT
In reply to Alexei Kosut who said
> > However, there are a *lot* of recommendations in the KNF document
> > which do not reflect existing consensus, many of which I frankly
> > regard as bad practice (i.e. "don't initialize your variables", "don't
> > declare variables in blocks").  In fact, the only thing in that
> > document which I think I agree with is brace-style for control
> > structures.  I would also therefore prefer to see the document either
> > written from scratch or based on some document which is closer to what
> > the group's actual preferences *are*.  
> Sounds good to me.

I modified everything that had a clear lead in the voting. Not everyone
had voted on the later points raised and so I just left them alone
until we had consensus. We can start from scratch if you wish but
that just seems like a total waste of time to me. Why don't we just list
the disagreements we have with the current doc and revise the thing, that's
how you deal with "standards" documents one there's some meat to them.

> > Starting from a list of winning entries on Ben's ballots will at least
> > avoid dragging in stuff on which no consensus was ever reached.  (Ben,
> > if you'd like to do things this way --- you seem to be putting in a
> > lot of time on style matters anyway --- you'd have my full support,
> > for what little it seems to be worth around here).
> I dunno... Ben seemed pretty far removed from the consensus. I think the
> "winner" should write it :)

Well, I only disagreed with two of the outcomes of the vote and I've changed
my position on both of those to match the vote results so I think I
end up qualifying for that position anyway :-)

> > 	/*
> >          *  Also, test pointers
> > 	 * against NULL, i.e. use:
> > 	 *
> > 	 * 	(p = f()) == NULL
> > 	 * not:
> > 	 *	!(p = f())
> >          */
> > 
> > !foo is used all over the current Apache code.
> Defenitely. I personally would like someone to explain to me why you'd
> ever want to test something against NULL, instead of just letting the
> expression evaluate itself. Correct me if I'm wrong, but NULL is usually
> defined as either (void*)0 or 0, and either way, it's just 0,
> which is the same thing that !foo evaluates to if foo is not 0. And, IMO,
> !foo looks a lot cleaner (and shorter).

Well, this is another open issue that we never even thought of. I'm not sure
myself on this yet, we'll await the discussion.

To re-iterate, this is a *DISCUSSION* document not my personal style guide.
A lot of these issues I don't even do myself in my code but having them
there in front of us has drawn our attention to issues we hadn't
considered. In my last reply (which no-one seems to have seen yet except
Ben) I raise my *own* disagreements with the current draft but I've left
them alone and raised them as issues to be discussed. Can some of us just
calm down and get on with the discussion instead of slagging off the

  Paul Richards, Originative Solutions Ltd.
  Phone: 0370 462071 (Mobile), +44 1225 447500 (work)

View raw message