Cryptic C code?

darryl at ISM780.UUCP darryl at ISM780.UUCP
Mon Aug 12 22:04:00 AEST 1985


>   Although this may seem cryptic at first sight, the notational
>   convenience is considerable, and the idiom should be mastered,
>   if for no other reason than that you will see it frequently in
>   C programs.
>
>I have trouble believing that the above has advantages of great
>speed OR readability over:

Note that K&R didn't say that the terse form had speed or readability
advantages; their comment was that the lack of keystrokes overrode
other considerations, once you got used to it.  They were writing
code using the ed editor on 110 or 300 baud terminals;  anything that
cut down the number of keystrokes was a big win.  If you don't like
the popular idioms in C, no says (well, at least, I don't) you have
to use them.  But you'd better get used to them, 'cause you'll see
them a lot.

Hnery Spencer aside, there does not seem to be a great force in the
C community to throw these idioms out of the language or of common use.
I suggest that they are here to stay;  if you don't like them, you're
going to be lumping them for a long time to come.


	    --Darryl Richman, INTERACTIVE Systems Corp.
	    ...!cca!ima!ism780!darryl
	    The views expressed above are my opinions only.



More information about the Comp.lang.c mailing list