comp.lang.ada
 help / color / mirror / Atom feed
From: Alan E & Carmel J Brain <aebrain@dynamite.com.au>
Subject: Re: Programming language vote - results
Date: 1997/10/21
Date: 1997-10-21T00:00:00+00:00	[thread overview]
Message-ID: <344D4787.260@dynamite.com.au> (raw)
In-Reply-To: 62fau3$fko$1@latte.cafe.net


Kaz wrote:

> >>Hence my preference for Ada. When listening to C weenies - er -
> >>enthusiasts talking about how their code is so tight, so efficient, and
> >>above all so impenetrable that it's obviously superior to another
> >>solution (in Ada so clear that "Any Fool could have written that"), I
> >>have to take a dried-frog pill and count to 10.

> In any case, Ada's clarity of expression is extremely overemphasized
> by Ada ween^H^H^H^Hadvocates.

The word you're looking for is "Fanatics". As in people who are so busy
fighting, they've forgotten what they're fighting for. I have been known
to suffer from this myself, as you may have guessed, but I try to keep
it in check. Sometimes it's difficult.

> Ada source has very little to guide the eye, due to its lack of the use of
> concise graphical symbols. Blocks delimited by BEGIN and END simply do not
> nest visually.

Concur. Chroma keying helps, as it does in any similar language. But
even {} is not really good, unless used in the style
xxxxxxx
{
  xxxx
  xxxxx
}

rather than

xxxxxxx {
  xxxx
  xxxxx
}

> The comments introduced by -- simply don't stand out very well.

As opposed to // ? Have to think about this one, I can't see there's
much to choose. */ and /* on the other hand, seem significantly worse.
But what about other languages/methods? How can this be done better?
Over 2 U for suggestions.
 
> The input character set is excessively restricted, and simple ()
> parentheses are too overloaded in meaning because {} and [] aren't available
> (is x(y) a function call or an array ref?).

Does it matter? Sometimes, yes, it does, and the overload is then a
right pain. Other times, the degree of abstraction that is optimal is
such that you don't need to know, and this is more often the case in the
domains I've been working in.
For example, TheGuestList(x) could be:
a function that examines a database on system 345 then assembles the
name into a record, then makes a call to a server outside the system to
find the dietary restrictions, then after completion asks for operator
input from another terminal so we can allocate a seat , or it could be a
simple reference to an array. In either case though, what you end up
with is a guest and the data. How that's done, especially on a
distributed system where the data is all over the place, is irrelevant
to the issue. More to the point, you can make a system where everything
is hard-coded in a table and get your segment working correctly, while
the team(s) doing the server and HCI get their act together 2 months
late.
  
The fact that other languages have this problem, and worse, is
immaterial.

> As a result, your brain has to do a lot more analysis when reading code,
> since you have to subconsciously check the syntax and even some semantics
> to glean information that could be lexically determined.

Excellent point, Sir! Agree that all languages I've seen have this
problem. Some worse than others, eg fred*bill; - declaration or
multiplication?
  
> Ada programs tend to be verbose and amorphous looking, qualities which occlude
> the meaning. (I'm talking about conventionally formatted programs, too e.g.
> GNAT sources. It wouldn't be fair to pick a purposely obfuscated example,
> just like it wouldn't be fair to choose an obfuscated C example.)

Partial agreement. Example: A loop through an enumerated type (this is
fairly common to a lot of problems, right?)

C++ (with Hungarian-like Notation)
//----------------------------------------------------------

enum TrafficLight_E [ Red_KE = 1, Amber_KE, Green_KE ];
const MaxTrafficLight_K = Green_KE + 1;

for (int index = 1; index < MaxTrafficLight_K ; index++)
{
   // some statements
}

//----------------------------------------------------------

compared with:

Ada (with TypeRecord notation)
--///////////////////////////////////////////////////////////

type TrafficLightType is (Red, Amber, Green);

for index in TrafficLightType
loop
  -- some statements 
end loop;

--///////////////////////////////////////////////////////////

In some ways, the C++ is more verbose, is it not?
 
> Although Ada is great, I wouldn't advocate it on grounds of lexical or
> syntactic convenience or readability. You'd have to be crazy!

To me, in the above example, the Ada is more readable. And a heck of a
lot easier to type. Examples are always suspect, however, and I agree
completely that you can always find a pathological case. Yet to me, this
one is not atypical: The Hungarian Notation for C++ seems neccessary to
me, since in C++ you're vitally interested in the representation. Sure,
it's a maintenance nightmare when an int changes to a long, but the
benefits far outway the disadvantages. At least IMHO.
In Ada, you've got better things to worry about than the representation,
as a general rule. And when you do need it, you use a representation
clause, such as one that makes Red equal to (binary) 100, Amber to 010
and Green to 001, as they may well do if you're controlling/reading via
a parallel port.

Your thoughts? I'm especially interested since you obviously know
something about Ada-83 or -95 as well as C/C++. Unlike most critics, I
hasten to add. Are you familiar with APL too? The comment symbol there
is not exactly obvious!
 
-- 
aebrain@dynamite.com.au     <> <>    How doth the little Crocodile
| Alan & Carmel Brain|      xxxxx       Improve his shining tail?
| Canberra Australia |  xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM
 abrain@cs.adfa.oz.au  o OO*O^^^^O*OO o oo     oo oo     oo  
                    By pulling MAERKLIN Wagons, in 1/220 Scale





  reply	other threads:[~1997-10-21  0:00 UTC|newest]

Thread overview: 147+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <343fbb5a.0@news.iprolink.ch>
1997-10-11  0:00 ` Programming language vote - results Gary L. Scott
1997-10-12  0:00   ` Jack Rudd
1997-10-13  0:00     ` Gary L. Scott
1997-10-13  0:00     ` safetran
1997-10-13  0:00       ` FRS DES
1997-10-13  0:00       ` Jack Rudd
1997-10-14  0:00         ` Philip Brashear
1997-10-14  0:00           ` Gary L. Scott
1997-10-13  0:00     ` Robert Munck
1997-10-13  0:00       ` Gary L. Scott
1997-10-13  0:00       ` Jack Rudd
     [not found]     ` <3442B745.5352@lmco.com>
1997-10-15  0:00       ` Gary L. Scott
1997-10-16  0:00       ` James Giles
1997-10-16  0:00         ` Andrew Haley
1997-10-13  0:00   ` David Ness
1997-10-14  0:00     ` Randy MacDonald
1997-10-14  0:00     ` Jan Karman
1997-10-15  0:00       ` Alan E & Carmel J Brain
1997-10-15  0:00         ` D'Arcy J.M. Cain
1997-10-15  0:00           ` Mark Stephen
1997-10-17  0:00             ` Randy MacDonald
1997-10-15  0:00           ` FRS DES
1997-10-16  0:00           ` Randy MacDonald
1997-10-16  0:00           ` Alan E & Carmel J Brain
1997-10-16  0:00             ` John Sullivan
1997-10-17  0:00               ` Randy MacDonald
1997-10-17  0:00               ` Alan E & Carmel J Brain
1997-10-17  0:00                 ` John Sullivan
1997-10-16  0:00             ` FRS DES
1997-10-17  0:00               ` Jerry van Dijk
1997-10-17  0:00             ` Randy MacDonald
1997-10-20  0:00               ` Alan E & Carmel J Brain
1997-10-20  0:00                 ` Lawrence Kirby
1997-10-20  0:00                   ` Kaz
1997-10-21  0:00                     ` Alan E & Carmel J Brain [this message]
1997-10-23  0:00                     ` Ada Readability (Re: Programming language vote - results) Ray Blaak
1997-10-21  0:00                   ` Programming language vote - results Alan E & Carmel J Brain
1997-10-20  0:00                 ` FRS DES
1997-10-21  0:00                   ` Alan E & Carmel J Brain
1997-10-21  0:00                 ` Randy MacDonald
1997-10-22  0:00                   ` Don Guinn
1997-10-29  0:00                     ` Randy MacDonald
     [not found]                     ` <01bce1bf$5c2baaa0$95b66bcf@dkelly.ark.com>
1997-10-29  0:00                       ` FRS DES
1997-10-29  0:00                       ` Don Guinn
1997-10-29  0:00                         ` Shmuel (Seymour J.) Metz
1997-10-31  0:00                         ` Documenting Code (was:Programming language vote - results) Alan E & Carmel J Brain
1997-10-30  0:00                           ` Charles Lin
1997-10-30  0:00                             ` James L. Ryan
1997-10-31  0:00                               ` Robert Bernecky
1997-10-31  0:00                             ` Robert Bernecky
1997-11-01  0:00                           ` Randy MacDonald
1997-11-01  0:00                             ` Robert Dewar
1997-11-03  0:00                               ` Jon S Anthony
1997-10-25  0:00                   ` Programming language vote - results Alan E & Carmel J Brain
1997-10-26  0:00                     ` functionality of Java (was Re: Programming language vote - results) Randy MacDonald
1997-10-23  0:00                 ` Programming language vote - results Jack Rudd
1997-10-25  0:00                   ` Alan E & Carmel J Brain
1997-10-25  0:00                     ` Kaz
1997-10-26  0:00                       ` FRS DES
1997-10-27  0:00                       ` Robert Bernecky
1997-10-27  0:00                         ` APL argument W. Wesley Groleau x4923
1997-10-28  0:00                           ` Randy MacDonald
1997-10-28  0:00                         ` Programming language vote - results Jan Karman
1997-10-28  0:00                           ` Robert Bernecky
1997-10-28  0:00                             ` James L. Ryan
1997-10-29  0:00                               ` Robert Bernecky
     [not found]                                 ` <bosworth-2910972044300001@access59.accsyst.com>
1997-10-30  0:00                                   ` Robert Bernecky
1997-10-30  0:00                                     ` James L. Ryan
1997-10-31  0:00                                       ` Robert Bernecky
1997-10-31  0:00                                         ` James L. Ryan
1997-10-29  0:00                     ` Jack Rudd
1997-10-25  0:00                 ` Peter Seebach
1997-11-18  0:00                   ` Ingemar Ragnemalm
1997-11-18  0:00                     ` Kevin Swan
1997-11-29  0:00                       ` Ingemar Ragnemalm
1998-09-10  0:00                         ` Steven Katz
1997-11-18  0:00                     ` Lawrence Kirby
1997-11-24  0:00                       ` Martin M Dowie
1997-11-25  0:00                         ` Mark Wilden
1997-11-25  0:00                           ` Martin M Dowie
1997-11-26  0:00                             ` Lawrence Kirby
1997-11-26  0:00                           ` FRS DES
1997-11-25  0:00                         ` Kaz Kylheku
1997-11-26  0:00                           ` Peter Seebach
1997-12-02  0:00                           ` ANDREAS LEITNER
1997-12-02  0:00                             ` Lawrence Kirby
1997-12-03  0:00                               ` Billy Chambless
1997-12-03  0:00                                 ` Robert Dewar
1997-12-02  0:00                             ` Robert Dewar
1997-12-05  0:00                             ` John Sullivan
1997-11-18  0:00                     ` firewind
1997-11-18  0:00                       ` Larry Elmore
1997-11-20  0:00                         ` firewind
1997-11-18  0:00                       ` Kevin Swan
1997-11-19  0:00                         ` Alan E & Carmel J Brain
1997-11-19  0:00                       ` Mike Smith
1997-11-19  0:00                         ` Matt
1997-11-20  0:00                         ` firewind
     [not found]                           ` <3474C71B.536B12F6@cgocable.net>
1997-11-21  0:00                             ` CVigue
1997-11-23  0:00                           ` Lawrence Kirby
1997-11-24  0:00                             ` FRS DES
1997-11-20  0:00                       ` Terry Richards
1997-11-20  0:00                         ` Andy Knight
1997-11-23  0:00                         ` Alex Krol
1997-11-25  0:00                         ` William Tanksley
1997-11-26  0:00                           ` Ron Natalie
1997-11-27  0:00                             ` William Tanksley
1997-11-27  0:00                               ` Lawrence Kirby
     [not found]                                 ` <65keij$mkd$1@nerd.apk.net>
1997-11-27  0:00                                   ` Kaz Kylheku
1997-11-28  0:00                               ` Shmuel (Seymour J.) Metz
1997-12-01  0:00                                 ` FRS DES
1997-11-20  0:00                       ` Coding for Obscurity Alan E & Carmel J Brain
1997-11-20  0:00                         ` Stephan Wilms
1997-11-21  0:00                           ` Jos A. Horsmeier
1997-11-23  0:00                           ` Alex Krol
1997-11-24  0:00                             ` Jim Johnson
1997-11-24  0:00                               ` Mark Wilden
1997-11-26  0:00                                 ` Robert S. White
1997-11-26  0:00                                   ` Leon Jones
1997-11-26  0:00                                     ` Lawrence Kirby
1997-11-26  0:00                                     ` Ron Natalie
1997-11-27  0:00                                       ` Joerg Rodemann
1997-11-26  0:00                                   ` Miguel Carrasquer Vidal
1997-12-01  0:00                                     ` ISONE
1997-12-01  0:00                                     ` ISONE
1997-11-26  0:00                                   ` Mark Wilden
1997-11-27  0:00                                   ` Richard A. O'Keefe
1997-11-23  0:00                           ` Al Christians
1997-11-24  0:00                           ` Richard A. O'Keefe
1997-11-24  0:00                             ` Matt
1997-11-24  0:00                               ` Ed Falis
1997-11-24  0:00                             ` Samuel T. Harris
1997-11-24  0:00                               ` Jon S Anthony
1997-11-25  0:00                                 ` Samuel T. Harris
1997-11-20  0:00                         ` firewind
1997-11-20  0:00                           ` Jos A. Horsmeier
1997-11-20  0:00                       ` Programming language vote - results Andy Knight
1997-11-20  0:00                         ` firewind
1997-11-19  0:00                     ` Alan E & Carmel J Brain
1997-11-19  0:00                     ` Peter Seebach
     [not found]           ` <01bcdad2$fa9fdf60$25a43a91@basil.omroep.nl>
1997-10-17  0:00             ` D'Arcy J.M. Cain
1997-10-17  0:00         ` Robert I. Eachus
1997-10-13  0:00   ` Robert S. White
1997-10-13  0:00     ` Gary L. Scott
1997-10-13  0:00   ` Matthew Heaney
1997-10-14  0:00     ` Gary L. Scott
1997-10-19  0:00 ` William Rapp
replies disabled

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