Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2(pesnta.1.2) 9/5/84; site scc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!idi!pesnta!scc!steiny From: steiny@scc.UUCP (Don Steiny) Newsgroups: net.lang.c Subject: Re: Re: more about programming style Message-ID: <505@scc.UUCP> Date: Sun, 14-Jul-85 17:34:14 EDT Article-I.D.: scc.505 Posted: Sun Jul 14 17:34:14 1985 Date-Received: Sat, 20-Jul-85 02:00:21 EDT References: <11457@brl-tgr.ARPA> <68@ucbcad.UUCP> Organization: Don Steiny Software Lines: 36 > > and if you don't know C you have no business trying to > understand it. > Wayne Really, do you want me to be out of a job? I think that standards of correctness are determined by the massive amount of existing C. The ++ convention is easy for me to understand. An example is variable names. People who come from other backgrounds than C programming often use long variable names, for instance: char *name_array[]; int name_array_index A C programmer might declare char *names[]; int i; Supposedly this is harder to understand. In the book "Learning to Program in C" by Thomas Plum he mentions that they looked at a bunch of C code and found out that 90% of C programmers use i and j as index variables. If people write programs that are unconventional C, they get hard to understand (the V7 Bourne Shell, for instance). One can use C macros to make their code look like other languages. The worst I have seen is programs by people whose first language was Fortran. I have written simple programs that will compile with either the C compiler or the F77 compiler. It is possible to use lots of goto's in C, but, why? Instead of trying to make C like COBOL, Pascal, or Fortran, why not learn all of the languages and use whichever one is appropriate to the task?