Subject: Re: Documentation/languages...
To: Peter Seebach <>
From: Greg A. Woods <>
List: current-users
Date: 05/19/1997 02:17:57
[ On Sun, May 18, 1997 at 23:41:01 (-0500), Peter Seebach wrote: ]
> Subject: Re: Documentation/languages...
> I'm currently leaning towards wanting C9X to *always* treat the old-style
> definitions as equivalent with the prototypes they spell, i.e., eliminate the
> argument promotion entirely.  Since old-style functions are obsolescent, it's
> no loss if it breaks something, right?  :)

Does C9X still do "normal" type promotions in *other* experssions?

If so how the hell do they reconcile the difference between function
call parameters and normal expressions?  Type coercion sucks in this
case (and has *no* apparent benefit other than confusion).

Type promotion in function calls was in K&R C for the very fact that
function call parameters are just normal expressions.

This is why I argue that even the current ANSI C behaviour of prototypes
is a somewhat drastic break from the original C language.

Actually type coercion sucks always.  Prototypes should warn about
missing casts, not provide them by default.  Period.

Removal of parameter type coercison and a return to normal type
promotion for expression terms as function call parameters and we'd have
the most broken parts of the real C language almost back in one piece.

> I would recommend against this.  Unprototyping is trivial and mechanical, but
> the alternative leaves us with, IMHO, crufty headers.

Better to keep this cruft in the preprocessor, IMHO.  ;-)

> I hope not.  Much though I want to see code updated into the current decade,
> I'm okay with the idea that rewriting 2 million lines of code may not be cost
> effective.

"Cost effective" doesn't come into the picture!  This is like the damned
Liberal Government of Canada under Trudeau saying that we'd save money
by converting everything to Metric!  There are a zillion documented
cases of tremendous expenses incurred just to convert legacy stuff, not
to mention the few cases where using SI conformant tools and products
(such as A4 paper in the North American world of 8.5"x11" copiers and
FAX machines and binders and shelving and file cabinets...) was counter
productive and indeed even one of the largest provincial governments
switched back to US Letter paper!

> I think the thing to do is to see if there's a way to get prototyped modern
> headers to compile with old-style code.  If there there is, we're probably
> going to be fine with that.

hmmm....  This I'd buy, and I'll put forth my proposal above as the best
solution, though I admit it might make a generation of ANSI C
programmers a bit hesitant.

							Greg A. Woods

+1 416 443-1734			VE3TCP			robohack!woods
Planix, Inc. <>; Secrets Of The Weird <>