Subject: Re: ANSI vs. K&R
To: None <perry@piermont.com, tech-misc@netbsd.org>
From: Ask Dr. Stupid <greywolf@starwolf.com>
List: tech-misc
Date: 03/12/1999 12:50:30
What's "KNF"?  Kernel Native Format?

"Perry E. Metzger" sez:
/*
 * 
 * Every once in a while we have the ANSI vs. K&R mandatory style
 * argument in NetBSD. Now that its past the 10th anniversary of the
 * formal adoption of ANSI C, I thought I'd bring it up again.
 * 
 * Although I think it would be silly to impose ANSI on the kernel and
 * gratuitously change everything for the sake of changing it, as it
 * stands, if someone writes ANSI style code (even ANSI code that is
 * essentially KNF but for the ANSIisms), we carefully go in and do lots
 * of work de-ANSIfying it before committing it.

de-ANSIfying seems awfully silly.  Does ANSIfication automatically imply
a performance hit?

 * 1) We should accept both ANSI and older dual ANSI/K&R style code
 * provided it is in KNF (with KNF being extended to permit ANSI
 * prototypes and such -- that usage is actually sort of explained in
 * share/misc/style already).

This makes sense.

 * 2) We should encourage new code to be written in ANSI KNF style.

This makes sense given that ANSI is obviously not going away, and is, in
fact, going forward.  Ten YEARS since ANSI started?  Dang, I remember doing
the NIST-PCTS and some ANSI conformance testing about ten years ago, right
at its inception.

Time flies when you're having fun.

 * 3) We should slowly allow our tree to get converted to ANSI, starting
 * first with things like removing __P from prototypes in userland
 * include files and such, and changing things we are likely to share
 * with FreeBSD last (assuming we can't get them to do the same thing as
 * us). The transformation could take place over some years -- no rush
 * needed.

Over the time period proscribed, this also makes sense, although, as I
said, I don't see any big flap over ansification, and so don't see why
FreeBSD wouldn't adopt this same process.

 * Comments?
 * 
 * Perry
 */





				--*greywolf;
--
When will people learn how to think!??  I long for the day to come when
software is purchased on the basis of technical merit and usefulness and not
on the basis of marketing bullsh*t.  And when is intelligence going to become
a prerequisite for survival?