[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: KNF/source programming questions
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Re: KNF/source programming questions
- From: "Joseph C. Bender" <benderjc_(_at_)_benderhome_(_dot_)_net>
- Date: Tue, 18 Jun 2002 12:58:32 -0400
At 03:34 PM 6/18/2002 +0000, Thorsten Glaser wrote:
>begin electrogrammati illius Joseph C. Bender
>>1. If working on existing kernel code and I find #define statements
>... which is still in the process of becoming KNFified, IIRC.
For clarification as to why I asked:
Right now, I'm trying my hand at cleaning up the code in sys/scsi/st.c
(thereby generating the questions, however, it's going fairly well, I hope
to submit a patch soon). I figured I'd get used to the style (by
reformatting old code), before attempting to (re)write anything in that
style (as it's not the format I usually write in).
>Since most processor architectures have the jump or goto or branch
>command, I think they should not be forbidden at all. Surely it
>_sometimes_ makes worse code to use goto, but sometimes it helps.
Yeah, and as a fairly recent learner of "C" (1996ish), "Goto considered
harmful" had been pounded into my brain.
Seeing gotos kinda was shocking (for someone who programs in a
function-based fashion), but I figured they might be there for a reason.
Joseph C. Bender
benderjc (at) benderhome.net
This account is used primarily for reading and responding to mailing list
traffic and is not my main mailing address.
My main mailing address is jcbender (at) benderhome.net
"Does the government fear us? Or do we fear the government? When the people
fear the government, tyranny has found victory. The federal government is our
servant, not our master." ---Thomas Jefferson