comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Side-effect arithmetic again [was: Ada ... in embedded systems]
Date: 1996/03/29
Date: 1996-03-29T00:00:00+00:00	[thread overview]
Message-ID: <Dp1Gxq.15M@world.std.com> (raw)
In-Reply-To: 4jchbi$ep0@dayuc.dayton.saic.com

In article <4jchbi$ep0@dayuc.dayton.saic.com>,
John G. Volan  <John_Volan@ccmail.dayton.saic.com> wrote:
>In article <DovoDs.3ML@world.std.com> Robert A Duff, bobduff@world.std.com
>writes:
>>Pardon my saying so, but that's complete nonsense.  You can't understand
>>Ada programs without understanding the semantics of Ada, whether or not
>>your identifiers are verbose or terse.  Furthermore, it is completely
>>irrelevant whether random folks off street can understand your Ada code.
>>What matters is whether a professional programmer, who knows the
>>language, can understand the code well enough to modify it without
>>breaking it.
>
>Then why did we ever bother with any of the identifiers on the left
>below, when the more terse identifiers on the right would have done
>"just as well" ... as long as you happened to be a member of that
>select coterie known as "professional programmers":

Because using zillions of strange abbreviations makes the code harder to
understand, FOR PROFESSIONAL PROGRAMMERS.  My point is just that this
has nothing to do with making the code understandable by random folks
off the street -- that's clearly impossible.  You cannot understand any
substantial Ada program if you don't know Ada -- and using nice
un-abbreviated identifiers won't change that fact.

>    Ada Identifier          Gratuitous Abbreviation
>    --------------          -----------------------
>..[various examples deleted]
>    Create                  Creat [truly, truly, gratuitous]

Yeah, that's a particularly bad one!

>Or is this whole discussion just a case of "_our_ cherished
>abbreviations (Inc, Dec) are things of ineffable beauty, but _those_
>abbreviations are utter abominations"?

Using Increment instead of "++" isn't going to make the program horribly
verbose.  My complaint is that people are suggesting a generic
instantiation, which is a bunch of useless verbosity, to replace
something that's very simple in C.

>But for better or for worse, Ada is (for the most part) a less terse
>language.  More importantly, the culture behind Ada tends to favor
>saying what you mean as plainly as possible, so that _intelligent_
>people (not necessarily language experts) have a better chance of
>reading it straight.

No, I disagree.  I don't care if people who don't know Ada can't read
Ada.  Of course they can't.  I want Ada to be readable so that people
who *do* know it can read it.  (And, of course, it's always a good idea
if the language is simple enough, so that people who *don't* know it can
*learn* it.)

>.. Ada culture does not tend to promote the invention
>of ad hoc "codes" that only the initiated can decipher. If that
>philosophy means you have to type in a few more keystrokes, well,
>keystrokes are cheap.  Misunderstanding can be expensive.

Agreed.

>[Then again, folks, Socrates was not well-liked... :-) ]

For good reason!  ;-)

>>... and we Ada folks start rambling on
>>about generic instantatiations and other complicated gobbledegook.
>>Sheesh.
>
>Hey, don't look at me.  My generics were about as inanely
>direct as I could make them.

My point is that they're not (and cannot be) "inanely direct" *enough*.
If you try to convince a C programmer to change "foo[i]++;" to
"Increment(Foo(I));", that's fine.  But to require a generic
instantiation in addition would make the C programmer laugh, and rightly
so.  I think we'd be better off just admitting that there's no direct
replacement for ++ in Ada, and tell the programmer, "Sorry, but you have
to write "Foo(I) := Foo(I) + 1;".

>... It's other folks that keep
>advocating gooping them up with complex agglomerations of 'Pos and
>'Val and what-not, just to get some marginal extra capabilities.

Yeah, I was complaining about that, too.

>But you don't like a generic as a workaround at all?  Alright, suggest
>something better, maybe even an Ada0X improvement, if you think it's
>warranted.

I did suggest a different workaround, using derived types.  Also, an
earlier version of Ada 9X had an even better solution (IMHO): you could
declare a procedure Increment, which would work on any integer type,
without cluttering up your program with generic instantiations.  The
generic solution just isn't worth it -- all I want to do is add 1 to a
variable.

>...Just don't tell me the answer is: "Either thou must accept
>the received perfection of Ada95 as it is, or thou mayst as well become
>a C programmer". Sheesh indeed.

OK, I won't tell you that -- I don't believe it.

- Bob




  reply	other threads:[~1996-03-29  0:00 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <823906039.22113@assen.demon.co.uk>
     [not found] ` <4fgrq3$mc4@qualcomm.com>
     [not found]   ` <dewar.823962356@schonberg>
1996-02-17  0:00     ` Ada is almost useless in embedded systems Tore Joergensen
1996-02-17  0:00       ` Robert Dewar
1996-02-19  0:00       ` Keith Thompson
1996-02-19  0:00         ` John McCabe
1996-02-21  0:00           ` Richard A. O'Keefe
1996-02-21  0:00             ` Norman H. Cohen
1996-02-19  0:00 ` AdaWorks
1996-02-21  0:00   ` Ken Garlington
1996-02-23  0:00     ` AdaWorks
1996-02-19  0:00 ` R.A.L Williams
1996-02-21  0:00   ` Richard A. O'Keefe
1996-02-19  0:00 ` Jon S Anthony
     [not found] ` <824056183.18993@assen.demon.co.uk>
     [not found]   ` <311E924E.74CE@escmail.orl.mmc.com>
1996-02-17  0:00     ` Ada is great for embedded systems (was Ada is almost useless in embedded systems) Ken & Virginia Garlington
     [not found]   ` <4fnqpm$3nh@news.sanders.lockheed.com>
1996-02-19  0:00     ` Ada is almost useless in embedded systems AdaWorks
1996-02-21  0:00       ` Hugh Dunne
1996-02-21  0:00       ` Ken Garlington
     [not found]   ` <4fnp37$nj1@theopolis.orl.mmc.com>
1996-02-22  0:00     ` Alan Brain
     [not found] ` <emery-0902962215150001@line316.nwm.mindlink.net>
     [not found]   ` <DMoA85.52I@eskimo.com>
     [not found]   ` <823965654.4500@assen.demon.co.uk>
     [not found]     ` <824165619.14894@assen.demon.co.uk>
     [not found]       ` <JSA.96Feb13133713@organon.com>
     [not found]         ` <824259217.26321@assen.demon.co.uk>
1996-02-17  0:00           ` Robert Dewar
1996-02-18  0:00             ` John McCabe
1996-02-18  0:00               ` Robert Dewar
1996-02-19  0:00                 ` John McCabe
1996-02-20  0:00                   ` Robert Dewar
1996-02-21  0:00                   ` Fergus Henderson
     [not found]         ` <824332550.2485@assen.demon.co.uk>
1996-02-17  0:00           ` Ken & Virginia Garlington
1996-02-17  0:00             ` Robert Dewar
1996-02-18  0:00               ` John McCabe
1996-02-18  0:00                 ` Robert Dewar
1996-02-19  0:00                   ` John McCabe
     [not found]       ` <4fs7ml$cf1@rational.rational.com>
1996-02-26  0:00         ` Ada 83 " Alan Brain
1996-02-26  0:00 ` Ada is almost useless " R.A.L Williams
     [not found]   ` <4h3q56$1vk@goanna.cs.rmit.EDU.AU>
     [not found]     ` <dewar.825635955@schonberg>
     [not found]       ` <826571250.140@assen.demon.co.uk>
     [not found]         ` <dewar.826634800@schonberg>
1996-03-21  0:00           ` John McCabe
1996-03-23  0:00             ` Side-effect arithmetic again [was: Ada ... in embedded systems] John G. Volan
1996-03-23  0:00               ` Robert Dewar
1996-03-25  0:00                 ` Tucker Taft
1996-03-25  0:00                   ` Robert A Duff
1996-03-25  0:00                   ` Norman H. Cohen
1996-03-26  0:00               ` John G. Volan
1996-03-26  0:00                 ` Robert Dewar
1996-03-29  0:00                   ` Robert I. Eachus
1996-03-26  0:00                 ` Robert A Duff
1996-03-26  0:00                   ` Tore Joergensen
1996-03-27  0:00                     ` John G. Volan
1996-03-27  0:00                     ` John G. Volan
1996-03-29  0:00                       ` Robert A Duff [this message]
1996-03-30  0:00                         ` John G. Volan
1996-03-30  0:00                         ` John G. Volan
1996-03-31  0:00                           ` AdaWorks
1996-04-01  0:00                           ` Robert A Duff
1996-03-27  0:00                     ` John G. Volan
1996-03-28  0:00                       ` Tucker Taft
1996-03-28  0:00                         ` Robert Dewar
1996-03-29  0:00                           ` Tucker Taft
1996-03-29  0:00                             ` Tucker Taft
     [not found] ` <RALW.96Feb28100925@vulcan.gmrc.gecm.com>
     [not found]   ` <dewar.825775334@schonberg>
     [not found]     ` <RALW.96Mar8113005@vulcan.gecm.com>
     [not found]       ` <4hv2fb$6ra@cville-srv.wam.umd.edu>
     [not found]         ` <4xybp895y6.fsf@leibniz.enst-bretagne.fr>
     [not found]           ` <3144CC40.33A0@escmail.orl.mmc.com>
     [not found]             ` <dewar.826604375@schonberg>
     [not found]               ` <3145FF2C.6139@escmail.orl.mmc.com>
     [not found]                 ` <dewar.826829407@schonberg>
     [not found]                   ` <31499D21.1DA6@escmail.orl.mmc.com>
1996-03-15  0:00                     ` Bug or Limitation? (was: Ada is almost useless in embedded systems) Robert Dewar
1996-03-16  0:00                       ` Ted Dennison
1996-03-20  0:00                         ` Side-effect arithmetic again [was: Ada ... in embedded systems] Robert I. Eachus
1996-03-20  0:00                           ` Robert A Duff
1996-03-21  0:00                             ` Peter Hermann
1996-03-21  0:00                               ` Robert Dewar
1996-03-25  0:00                                 ` Robert I. Eachus
1996-03-28  0:00                               ` Mats Weber
1996-03-29  0:00                                 ` John G. Volan
1996-03-20  0:00                           ` John G. Volan
1996-03-22  0:00                             ` Alan Brain
1996-03-21  0:00                           ` Geert Bosch
1996-03-26  0:00                           ` Mats Weber
1996-03-15  0:00   ` Ada is almost useless in embedded systems Robert I. Eachus
1996-03-18  0:00     ` Alan Brain
     [not found]       ` <4ik5bm$ogg@dayuc.dayton.saic.com>
1996-03-18  0:00         ` Side-effect arithmetic again [was: Ada ... in embedded systems] Robert Dewar
1996-03-19  0:00           ` Jay Martin
1996-03-21  0:00             ` Robert I. Eachus
1996-03-19  0:00           ` Norman H. Cohen
     [not found]     ` <dirk.827148504@demokrit>
1996-03-18  0:00       ` Ada is almost useless in embedded systems David Weller
1996-03-16  0:00 ` Kevin Dalley
replies disabled

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