Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/28/84; site lll-crg.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!umcp-cs!gymble!lll-crg!brooks From: brooks@lll-crg.ARPA (Eugene D. Brooks III) Newsgroups: net.lang.c Subject: Use of expression values in C Message-ID: <685@lll-crg.ARPA> Date: Sun, 7-Jul-85 15:02:40 EDT Article-I.D.: lll-crg.685 Posted: Sun Jul 7 15:02:40 1985 Date-Received: Mon, 8-Jul-85 07:27:51 EDT References: <474@crystal.UUCP> <397@umcp-cs.UUCP> <721@wlcrjs.UUCP> <5755@utzoo.UUCP> Organization: Lawrence Livermore Labs, CRG group Lines: 35 > It is entirely possible to understand the semantics of the code fully and > still consider it unnecessarily obscure and hard to read. The mark of a > good programmer is that his code is *easy* to read, not just *possible* to > read. Using every obfuscatory feature of the language, perhaps in the > (oft-mistaken) belief that it improves efficiency, and then pleading that > "any experienced programmer should be able to understand that" is the mark > of someone who doesn't understand what this business is about. Not being a professinal progammer or even a computer scientist, perhaps my opinion that if((fptr = fopen(filename, "r")) == NULL) { fprintf(stderr, "Can't open %s for reading\n", filename); exit(1); } if perfectly clear to anyone who understands the C language and is not obfuscatory is misinformed. You can be assured that I will continue to use it and I will not hire any "professional programmers" who consider it bad programming practice. They may have a case with the employment office however, refusual to hire on the basis of their religion! Any C programmers who can't easily understand the above example simply aren't good enough to be working for me. When they aren't hired, or are fired, they will have no recourse. I do agree with the point that using subtle features of the C language which make even the most experienced C programmer stop and think for a while about what is being said is a bad programming practice. An example of such stuff would be if(a = b++ * --c) and I do remember a lot ot even more undesirable examples. I therefore agree with the point made above about writing super terse programs. The fopen case above simply isn't one of them.