more about programming style

Craig Partridge craig at loki.ARPA
Thu Jul 11 23:17:16 AEST 1985


    I'm afraid I don't find your story convincing for a couple of reasons.

    First, and maybe I'm rare, but when I learned to program several years
ago, my university took the view that as good programmers, we were expected
to be able to learn a new computer language in a few hours or days.  Indeed, 
after the first couple of courses, professors would simply announce they
expected a programming assignment to be in X programming language.  If you
didn't already know it (and frequently people didn't) you had to learn it,
fast.  So I have little sympathy for your poor person who doesn't
know the language (take a book home and read for a couple of hours tonight).

    Second, I think all languages have special idioms that people who
program in them typically use.  In most cases, I think new programmers
have some obligation to use those idioms.  Why? Because (contrary to your
example) in most cases someone reading your code is more likely than
not to be well versed in the language, and will be more confused by code which
doesn't use the established idioms.  Witness the letters already submitted
in which people say strongly they find i++ more intuitive than i = i + 1.


Craig Partridge
craig at bbn-loki (ARPA)
craig%loki.arpa at csnet-relay (CSNET)
{decvax,ihnp4,wjh12}!bbncca!craig (USENET)



More information about the Comp.lang.c mailing list