comma operator: keep away?

Henry Spencer henry at utzoo.uucp
Thu Apr 27 07:51:13 AEST 1989


In article <2495 at bucsb.UUCP> crewman at bucsb.bu.edu writes:
>Getting back to the poster of the above article, why is the person who likes
>the comma construct an amateur?  Is it because s/he likes a unique feature
>of C?  Or is it really because the above "professional" would get confused
>reading such code?  In a business which so sorely "needs professionals", why
>are we bending over backwards to make our programs easier to read for ama-
>teurs?

We are not bending over backwards to make our programs easier to read for
amateurs; we are bending over backwards to make them easier to read for our
fellow professionals.  We are not trying to meet some minimum standard of
readability, and indulging our little egos beyond that; we are trying to
make the stuff AS CLEAR AS POSSIBLE even if it hurts.

>C is designed to be a low-level language...

Opinions vary on this.  How do you write "*p++ = *q++" in Fortran?  Which
is the higher level language, based on this comparison?  (Or any comparison,
apart from the marginal issue of complex numbers.)

>...as C programmers, we have the tools to make powerful programs compact.  Yet
>we are constantly advised to throw away these tools.  I believe that
>that is VERY unprofessional.

As C programmers, we have the tools to make powerful programs utterly
unreadable if we make the slightest effort in that direction.  Making them
readable, on the other end, takes significant work and considerable restraint.
-- 
Mars in 1980s:  USSR, 2 tries, |     Henry Spencer at U of Toronto Zoology
2 failures; USA, 0 tries.      | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.unix.questions mailing list