comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: Re: ada paper critic
Date: Fri, 14 Jun 2002 18:00:10 +0100
Date: 2002-06-14T18:00:10+01:00	[thread overview]
Message-ID: <SipO8.1756$x96.108881@newsfep1-win.server.ntli.net> (raw)
In-Reply-To: 3D0A1293.5000005@ozemail.com.au


"Andrew Maizels" <pixymisa@ozemail.com.au> wrote in message
news:3D0A1293.5000005@ozemail.com.au...
> Alderson, Paul A. wrote:
>
> >    MY_BIG_BLOATED_PACKAGE_NAME.MY_BIG_BLOATED_VARIABLE_NAME :=
> >
MY_OTHER_BIG_BLOATED_PACKAGE_NAME.MY_BIG_BLOATED_ARRAY_OR_FUNCTION(MY_BIG_BL
> > OATED_GLOBAL_LIT_PACKAGE.AND_OF_COURSE_A_BIG_BLOATED_LITERAL);

It's considered good style to reserve capitals for constants.


> Yeah, this sucks.  And having to haul in a dozen different packages to
> do anything useful sucks too.


Have either of you tried improving readability with local use clauses
instead of global ones?

e.g.

procedure My_Big_Bloated_Procedure is
begin
   My_Package.My_Variable_Name :=
     My_Other_Package.My_Function (var_one, var_two);
end My_Big_Bloated_Procedure;

goes to

procedure My_Big_Bloated_Procedure is
use My_Package;
use My_Other_Package;

begin
   My_Variable_Name := My_Function (var_one, var_two);
end My_Big_Bloated_Procedure;


It's a compromise between the two extremes.

> > The main point here is that the Ada code above requires one to go and
lookup
> > what MY_BIG_BLOATED_ARRAY_OR_FUNCTION is.  Is it a function or an array?

[refers to earlier post]

Functions is similar to arrays (but not the otherway  A function is a
mapping from the domain to the codomain.  For programming we compute the
answer, but it'd be equally valid to define a function in terms of a set of
tuples (inputs, result).  Given an input, you can return the appropriate
result.  e.g.

function negate (x : in boolean) return boolean is
begin
   if x = true then
      return false;
   end if;
   return true;
end not;

Can be given in like this {(false, true), (true, false)}.  You can now drop
in the array as a replacement,

negate : constant array (boolean) of boolean := (true, false);


The syntax allows you to replace a function with an array, which you might
want to do if the domain is small and the function non-trivial.  That might
help improve the speed of a program dependant on the function a lot (In some
cases it might be possible for the compiler to do even better, eleminating
the address computation in the final program, i.e. if x never changes and a
never changes, then a(x) is always the same, but that'd only work in certain
circumstances).

This is done in graphics programming since the cost of computing the address
of the element corresponding to an angle is cheaper computing the cosine and
sine of that angle over and over.  In Ada you don't need to be conciously
aware of that by using a different syntax.


> > Another issue that is often overlooked is that the computer language can
not
> > realistically be treated as a stand-alone unit.  Sure if you want to
argue
> > about "what ifs" or are into fantasy writings....  Here is where Ada
falls
> > by tripping over a steel girder onto its' face into a titanium floor.
The
> > big issues of why Ada is either dead or in severe decline are:
> >
> > (And the top ten "Why Ada is dead" reasons are!:)
> >
> > 1.) Ada is not taught anymore. (Never really ever were that many
> > classes for it.)
>
> Maybe.

there is atleast one uni in Scotland (I remember seeing another one, but not
sure) teaching Ada and one down south.  It might not be taught much but it
is still taught.

Just found this, don't know how current it is though,
http://sw-eng.falls-church.va.us/ajpo_databases/colleges_universities_nonusa
.html



> > 3.) Ada has no nice string handling capabilities.
> >          (Yeah yeah yeah library XYZ does...is it in the standard
> > distribution?)
>
> Huh?  Ada's string handling is just peachy.  It's annoying that there
> are six different string types, but everything you could ask for is there.
>
> C, on the other hand, has the worst string handling of any major
> language.  C strings are *EVIL*.
>
> > 4.) Ada has no in-expensive development suits that are easy to use.
>
> Gnat is easy to use.  Not flashy, but easy enough.

Plus GNAT can be used with AdaGIDE, emacs, ConTEXT, jGrasp or any other good
editor just like every other command line orientated compiler.  GUI building
tools are slightly lacking, but that situation will get better with time.


Chris





  reply	other threads:[~2002-06-14 17:00 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-14 14:31 ada paper critic Alderson, Paul A.
2002-06-14 15:16 ` Darren New
2002-06-14 15:58 ` Andrew Maizels
2002-06-14 17:00   ` chris.danx [this message]
2002-06-14 18:44     ` Jeffrey Carter
2002-06-14 20:26       ` Immanuel Scholz
2002-06-14 22:06         ` Ehud Lamm
2002-06-14 22:01           ` Immanuel Scholz
2002-06-14 22:38             ` sk
2002-06-15 11:28               ` Immanuel Scholz
2002-06-15 18:10                 ` sk
2002-06-15 14:30               ` Ted Dennison
2002-06-15 17:36                 ` sk
2002-06-16  3:08                 ` Gautier
2002-06-16  0:05               ` AG
2002-06-16 21:05                 ` Gautier
2002-06-14 23:10             ` tmoran
2002-06-15 14:19         ` Ted Dennison
2002-06-15 23:04           ` Darren New
2002-06-15 23:38             ` Darren New
2002-06-17 10:56           ` Immanuel Scholz
2002-06-17 19:56             ` Brian Rogoff
2002-06-17 20:47               ` Marin David Condic
2002-06-18 18:10                 ` Brian Rogoff
2002-06-18 18:51                   ` Robert A Duff
2002-06-18 19:08                     ` Hyman Rosen
2002-06-18 20:47                       ` Robert A Duff
2002-06-19  5:28                 ` Robert I. Eachus
2002-06-18 14:01               ` Robert A Duff
2002-06-14 20:58 ` Ted Dennison
2002-06-14 21:30   ` Immanuel Scholz
2002-06-15  1:24     ` Larry Kilgallen
2002-06-15  3:02 ` Vinzent Hoefler
2002-06-15 21:54 ` AG
  -- strict thread matches above, loose matches on Subject: below --
2002-06-14 22:28 Gautier direct_replies_not_read
2002-06-15 14:43 ` Ted Dennison
2002-06-14 22:18 Beard, Frank [Contractor]
2002-06-15  1:38 ` Jeffrey Carter
2002-06-14 22:08 Beard, Frank [Contractor]
2002-06-14 20:36 Beard, Frank [Contractor]
2002-06-14 21:34 ` Immanuel Scholz
2002-06-15  4:14   ` Lyle McKennot
2002-06-14 20:06 Gautier no_direct_reply_please
2002-06-14 20:48 ` Baugereau
2002-06-15 14:38   ` Ted Dennison
2002-06-14 19:42 Gautier no_direct_reply_please
2002-06-15 15:08 ` Simon Wright
2002-06-15 22:52 ` Robert A Duff
2002-06-16  0:38   ` AG
2002-06-17 14:15     ` Marin David Condic
2002-06-18 13:52       ` Robert A Duff
2002-06-18 15:41         ` Darren New
2002-06-18 18:04         ` Jeffrey Carter
2002-06-19  1:04           ` Rod Haper
2002-06-16 22:19   ` Ted Dennison
2002-06-16 23:02     ` Robert A Duff
2002-06-17  7:07       ` Kevin Cline
2002-06-18 20:54         ` Robert A Duff
2002-06-18 22:15           ` Larry Kilgallen
2002-06-14  0:49 Immanuel Scholz
2002-06-14  1:28 ` Immanuel Scholz
2002-06-14  1:43   ` Dale Stanbrough
2002-06-14  4:53     ` David Marceau
2002-06-14  6:40       ` Dale Stanbrough
2002-06-14  6:49       ` Hyman Rosen
2002-06-14 12:18       ` Baugereau
2002-06-14 16:30         ` David Marceau
2002-06-14 17:34           ` Baugereau
2002-06-14 19:01             ` Wes Groleau
2002-06-14 19:43               ` Baugereau
2002-06-15  3:02                 ` Vinzent Hoefler
2002-06-15  9:49                   ` Pascal Obry
2002-06-17 15:53                     ` Dan Andreatta
2002-06-17 18:20                       ` Pascal Obry
2002-06-17 20:56                     ` Michael Bode
2002-06-17 21:18                       ` Pascal Obry
2002-06-16 21:52                   ` Ted Dennison
2002-06-14 20:02     ` Immanuel Scholz
2002-06-14  3:14   ` Ted Dennison
2002-06-14  4:35     ` Dale Stanbrough
2002-06-14  8:05       ` David Marceau
2002-06-14 12:31         ` Dale Stanbrough
2002-06-14 15:08         ` Darren New
2002-06-17  0:17           ` Robert A Duff
2002-06-14 19:05         ` Wes Groleau
2002-06-16  3:34           ` Dale Stanbrough
2002-06-16  3:32         ` Dale Stanbrough
2002-06-14  8:25       ` Dmitry A. Kazakov
2002-06-14 12:19         ` Immanuel Scholz
2002-06-14 14:51           ` Dmitry A. Kazakov
2002-06-14 15:09             ` Darren New
2002-06-16 22:49               ` Dmitry A.Kazakov
2002-06-16 15:07                 ` Jim Rogers
2002-06-17  4:06                   ` Darren New
2002-06-17  4:52                     ` Jim Rogers
2002-06-17  9:45                       ` David Marceau
2002-06-17 15:42                       ` Darren New
2002-06-17  3:59                 ` Darren New
2002-06-17 22:19                   ` Dmitry A.Kazakov
2002-06-14 12:58       ` Larry Kilgallen
2002-06-14 22:16         ` Dale Stanbrough
2002-06-15  1:22           ` Larry Kilgallen
2002-06-15  0:51             ` Dale Stanbrough
2002-06-15 11:49               ` Immanuel Scholz
2002-06-15 21:45             ` Robert A Duff
2002-06-14 14:59       ` Ted Dennison
2002-06-16  3:27         ` Dale Stanbrough
2002-06-16 22:18           ` Wes Groleau
2002-06-16 22:38           ` Ted Dennison
2002-06-14 15:00       ` Ted Dennison
2002-06-14 20:13         ` Wes Groleau
2002-06-14 18:52       ` Jeffrey Carter
2002-06-15 22:03         ` Robert A Duff
2002-06-16  1:58           ` Jeffrey Carter
2002-06-16  3:19             ` Dale Stanbrough
2002-06-16 22:20         ` Wes Groleau
2002-06-17  1:57           ` Larry Kilgallen
2002-06-17  2:16           ` Jeffrey Carter
2002-06-14 15:25   ` John R. Strohm
2002-06-15  4:05     ` Lyle McKennot
2002-06-17 13:32       ` Marin David Condic
replies disabled

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