"C" wish list/semicolons

David Herron, NPR Lover david at ukma.UUCP
Fri Nov 8 02:04:20 AEST 1985


In article <142 at ucbjade.BERKELEY.EDU> mwm at ucbopal.UUCP (Mike (I'll be mellow when I'm dead) Meyer) writes:
>
>Humbug! People arguing about whether semicolons should separate or terminate
>statements are in the same class as people arguing whether 8080's or 6502's
>are the microprocessor of choice. There's a commonly used better way than
>either alternative.
>
>The thing to remember is that PEOPLE are the most important readers of a
>program. If they can't read and understand it, they can't maintain it.
>Taking that into account, the best thing for semicolons is:

I agree.  But I have a solution which will solve *everything* (:-)).


>For example, a block could look like:
>
>	{
>	x = 23; y = 40
>	z = x + y
>	printf("Messy Format", x, y, z,
>		f)	/* Statement didn't end, as it wouldn't parse */
>	f = x + 7	/* Does this end? */
>		* y	/* Uh, no... */
>	}
>
>No mess, no sweat when adding statements. Fewer kestrokes, and it's easier
>to read than either other version.

Welllll....    "*y" is a legal C statement all by itself.


All this stuff with blocks (and whether to use begin...end or {..})
is silliness.

Why not be totally visual about it?  When you want a block of stuff,
simply draw a box around it.  For goto statements, draw a line from the
box to wherever you want to go.  

Sigh.  It doesn't solve the seperator problem  (unless you want to
have one box per statement).


-- 
David Herron,  cbosgd!ukma!david, david at UKMA.BITNET.

English is a second language to me -- Baby talk was my first language.



More information about the Comp.lang.c mailing list