Subject: Re: ANSI vs. K&R
To: None <perry@piermont.com>
From: None <seebs@plethora.net>
List: tech-misc
Date: 03/12/1999 14:33:53
In message <87bthyo3qm.fsf@jekyll.piermont.com>, "Perry E. Metzger" writes:
>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).

Yes!  Please!

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

>I think this is likely more controversial.

True.

>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.

Yay!

I guess, I'm all for it.  C9X is just around the corner, and while I'm
not about to start pushing for widespread adoption of the new features, I
don't see any remaining benefit in keeping code "compatible" with old
compilers.  And by old, I mean more than ten years old in most cases.

At this point, I don't believe new porting work is happening to systems
for which there is no ANSI compiler.  In any event, we seem to be pretty
much committed to using more modern tools.

Whether it's ideal or not, ANSI C has much better type checking than K&R,
and I don't see any real world benefit to preserving "compatability" - as if
the software would run on a pre-ANSI system anyway.  We're using so many
other new features anyway...

-s