Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucsfcgl.UUCP Path: utzoo!linus!decvax!ucbvax!ucsfcgl!arnold From: arnold@ucsfcgl.UUCP (Ken Arnold%CGL) Newsgroups: net.lang.c Subject: Re: C programming style Message-ID: <587@ucsfcgl.UUCP> Date: Sat, 20-Jul-85 16:33:56 EDT Article-I.D.: ucsfcgl.587 Posted: Sat Jul 20 16:33:56 1985 Date-Received: Sun, 21-Jul-85 23:34:14 EDT References: <11434@brl-tgr.ARPA> <303@ur-laser.uucp> <186@drivax.UUCP> <74@avsdS.UUCP> Reply-To: arnold@ucsfcgl.UUCP (Ken Arnold) Organization: UCSF Computer Graphics Lab Lines: 32 In article <74@avsdS.UUCP> tooch@avsdS.UUCP (Michael J. Tuciarone) writes: >C may never approach Pascal for sheer readability, but the trade- >off made in favor of brevity and richness of expression seems >well worth the small extra effort invested in learning to speak >the language well. Mike makes several excellent points in this article (including an appeal to professional courtesy from all of us professed professionals), but I think he is being a bit oversimple here. Readability is not a boolean value, but a vague factor with many variables. Some of these are language dependent (I always find APL nearly impossible to read, for example; others may not, so maybe this is "programmer+language dependent"). Others are programmer dependent. C is very readable. To me, it is more readable than PASCAL, because its bandwidth of communication is higher, i.e., it uses nearly the full ASCII set of characters instead of words. I find it easier to scan C code than PASCAL code because "and", "begin", "end", etc., have to be read to distinguish them from variables, whereas &&, {, }, etc. are easy to tell from variables. The "richness of expression" of C contributes to its readability WHEN you know the language. When you don't, it hurts. This doesn't bother me. The fact that I don't understand how my car engine works never stopped me from driving it. It would be nice if I did understand all the techonology I use so that I can fix it when it doesn't work, but I don't. So I don't understand why people expect programs to be understandable to everyone. They tried that with COBOL, and what they ended up with was a still unreadable language that nobody wanted to program in (not that it stopped the bosses from wanting them to). Ken Arnold