Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!AI.Mayank@MCC.ARPA From: AI.Mayank@MCC.ARPA (Mayank Prakash) Newsgroups: net.lang.c Subject: Re: More about programming style Message-ID: <11470@brl-tgr.ARPA> Date: Wed, 10-Jul-85 18:03:24 EDT Article-I.D.: brl-tgr.11470 Posted: Wed Jul 10 18:03:24 1985 Date-Received: Fri, 12-Jul-85 04:48:19 EDT Sender: news@brl-tgr.ARPA Lines: 40 >From: DHowell.ES@XEROX.ARPA >Subject: more about programming style > >Ok, let me clarify a few things here. By "idioms", I mean a piece of >code in a language which can be directly translated into another piece >of code in that ame language and looks similar in syntax to the same >piece of code in many other languages. This would include i++ for i = i >+ 1 and if((a=b)==c) for a=b; if (a==c). Idioms are language-specific. >These are the idioms that I would avoid to make programs more readable. > . . . >program is fixed, and we all live happily ever after. > >I know this was a rather long story, but I had to get my point across >somehow. Remember that the "I" in that story could be someone you will >be working for. > >Dan Aren't you really saying that all languages should follow the syntax of Pascal. Since Pascal uses i := i+1, that is how all languages ought to be. The next thing you would say is that I don't know any programming, but if I can't debug this large complex program (written in any language), then it is poorly written program and uses obscure idioms etc. etc. The point is, each language has the right to have its own syntax, and conventions and whatever. While you may like one syntax over another, you certainly cannot blame programmers for using those elements of a language yuo don't like. Remember to a large extent, the whole subject is very subjective, and is really a matter of what you are used to more than anything else. If you had been brought up in the C tradition, you probably would have taken the opposite sides. Note: I am not an expert C programmer, nor am I trying to defend idiosyncracies of C (such as i = i++), but I would certainly agree with the C experts on this issue. - mayank. -------