comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re:  Software vendors not using Ada but C
Date: 23 Jun 93 22:10:47 GMT	[thread overview]
Message-ID: <1993Jun23.221047.16156@seas.gwu.edu> (raw)

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."
------------------------------------------------------------------------

             reply	other threads:[~1993-06-23 22:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-06-23 22:10 Michael Feldman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-06-27 12:38 Software vendors not using Ada but C David Weller
1993-06-25 23:39 Mark Bayern
1993-06-24  6:05 ghost.dsi.unimi.it!univ-lyon1.fr!scsing.switch.ch!epflnews!disuns2.epfl.c
1993-06-23 20:44 cis.ohio-state.edu!math.ohio-state.edu!uwm.edu!ogicse!netnews.nwnet.net!n
1993-06-23 20:33 Robert Firth
1993-06-23 19:07 Bill Yow
1993-06-22 15:33 agate!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!col.hp.com!cs
1993-06-22 12:30 Mike King
1993-06-22  6:50 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!cs.utexa
1993-06-18 14:19 Colin James 0621
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox