Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!ll-xn!mit-eddie!apollo!arnold
From: arnold@apollo.UUCP
Newsgroups: comp.lang.c
Subject: Re: Style [++i vs i++]
Message-ID: <35f199bd.ae48@apollo.uucp>
Date: Wed, 8-Jul-87 18:00:00 EDT
Article-I.D.: apollo.35f199bd.ae48
Posted: Wed Jul  8 18:00:00 1987
Date-Received: Sat, 11-Jul-87 13:56:40 EDT
References: <17310@amdcad.AMD.COM> <246@hubcap.UUCP> <1748@zaphod.UUCP>
Reply-To: arnold@apollo.UUCP (Ken Arnold)
Distribution: na
Organization: Apollo Computer, Chelmsford, MA
Lines: 40

In article <1748@zaphod.UUCP> billj@zaphod.UUCP (Bill Jones) writes:
>Yet in the opening section of the C++ Book, we find
>
>    "The name C++ was coined by Rick Mascitti.  The name signifies
>     the evolutionary nature of the changes from C.  '++' is the C
>     increment operator.  The slightly shorter name C+ is a syntax
>     error; it has also been used as the name of an unrelated
>     language.  Connoisseurs of C semantics find C++ inferior to
>     ++C."

This is brought to you courtesy of the people who consider

	char*   ptr;

to be good style.  I wouldn't put too much faith in their assertions of
their own connoisseur-ship.  Their code is probably the ugliest
*published* C code (from a stylistic viewpoint) that I have seen.

"i++" is what I learned, and although I can hardly claim to be one of
the original C programmers, I do go back some ways, and picked up most
of my style from the kernal (which wasn't perfect, but was the largest
block of extant C code available).  Not that it makes any difference on
any compiler worth a bucket of warm cow spit...

		Ken Arnold

P.S.  Just to avoid someone asking, the reason I consider the above
variable declaration to be ugly style is that

	char*   p1, p2;

doesn't do what it implies it ought to do.  The '*' still is a modifier
of p1, even though it is *strongly* attached visually to the type,
which it is not a part of at all.  In other words, the visual binding
of the '*' to "char" is exactly opposity the syntactic binding of '*'
to p1; or, more succintly, the layout lies about the meaning.

If you want to discuss *this* style point, please change the subject
line.  I'm just using it as an example of why *not* to trust the C++
people on style.