From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 23 Jun 93 22:10:47 GMT From: seas.gwu.edu!mfeldman@uunet.uu.net (Michael Feldman) Subject: Re: Software vendors not using Ada but C Message-ID: <1993Jun23.221047.16156@seas.gwu.edu> List-Id: In article <1993Jun23.163346.29745@sei.cmu.edu> firth@sei.cmu.edu (Robert Firth ) writes: >In article <1993Jun23.190753.8583@aio.jsc.nasa.gov> yow@pat.mdc.com (Bill Yow) writes: > >>Well, when I was in school the C class I took (in 86) the professor would not >>allow us to use (). The reason, he felt that a good C programmer should not >>need to use () but should know all of the precedence rules. > >Good grief. And I thought Jean Ichbiah was paranoid when he refused to >give "and" and "or" the same precedence rules in Ada that they had in the >propositional calculus. Not verbatim, but approximately: "Robert, a >programmer should never have to learn a new precedence rule as part of >a language. The language should use only rules everyone already knows." > >As usual, Jean, you were right. And how! Students have more important things to learn than big precedence tables. IMHO the precedence rules are designed to make expression evaluation well-defined and (reasonably) intuitive, in the absence of parentheses. I teach precedence as a more-or-less advanced topic, more to illustrate how the language designers thought out the precedence than to make the students learn it. The old reason for omitting parentheses was to save keystrokes, in the punchcard days when your department was charged, by the keystroke, for keypunch services. I guess the new reason is to show how macho you are. I pity your teacher's students - they were forced to spend so much effort on diddly stuff that undoubtedly they neglected the more important overall structural and design issues. This has nothing and everything to do with Ada. A program is written once, but read a million times. Readability is, of course, a matter of taste, but readability should be an important, if not _the_ important, criteria in code layout (including parentheses). Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - co-chair, SIGAda Education Committee Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5253 (voice) - 202-994-5296 (fax) - mfeldman@seas.gwu.edu (Internet) "Pork is what those other guys get from the Government." ------------------------------------------------------------------------