Use of expression values in C
Henry Spencer
henry at utzoo.UUCP
Tue Jul 9 07:26:00 AEST 1985
> ... 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...
That's probably just as well, since they probably don't want to work
for someone who thinks "readability" is a Boolean characteristic! I
didn't say it wasn't readable, or that I couldn't read it; I said that
it isn't *as* readable as it *could* *be*, and that this is undesirable.
The degree of readability of "if ((foo=..." is a reasonable subject of
debate, but I decline to back down on the general assertion that one mark
of a professional is a genuine effort to *maximize* readability, not
just to bring it above some minimum threshold.
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list