comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Ada Pointer Problem
Date: Fri, 08 Oct 2004 14:02:52 +0200
Date: 2004-10-08T14:02:52+02:00	[thread overview]
Message-ID: <blv5kc.tv.ln@skymaster> (raw)
In-Reply-To: <35f054ea.0410071045.58d3e9af@posting.google.com>

skidmarks a écrit :

  > Ada draws sharp distinction between Ada constructs and similar
> constructs in other languages. In the early years (Ada 83) this
> distinction seems to have led to an abandonment of the use of common
> terminology in favor of the Ada specific flavor. 
Well, this may be intensional for pointers, because Ada pointers are 
really different from pointers in other languages. But it is certainly 
not true of other terms. For example, "Task" was the common accepted 
name for concurrent activities. The term "thread" was introduced much later.

> [...] My argument is that
> even if the compiler had been more congenial, the language is still
> tortuous. And for me, tortuous to the point of being almost unusable.
> To continue the point, the Ada developers recognized both the
> indavisability of doing what I wanted and the advisability of letting
> me do this assignment, also mentioned in this thread and very
> gratefully received by me. However, this is a research game. Ada has
> protected me to the point that I can't get my job done without
> research. Commmon assumptions are uncommonly treated.
Let's be clear: to use Ada appropriately, you need some training. Ada is 
different from other languages on many aspects, and rightly so I would 
say, otherwise there would be no benefit in using Ada. True enough, the 
programmer used to other languages does not find the one to one mapping 
he would find with other languages.

Ada is for industrial projects, and for providing a different view of 
software development. Some training is required, as it would be with any 
new engineering process in any other part of industry. If a new machine 
is put in a factory, everybody will agree that people must be trained to 
use it. Why do the software people believe that they should be able to 
use a new language just by a trial-and-error process?

> Why pointers? The compilers we are using pass by value. Arrays and
> records copied to the stack on subprogram entry, and copied back on
> subprogram exit (or so I have been told). A pointer reduces this copy
> operation.
Are you sure? Did you check it, or is it just hear-say? Any decent Ada 
compiler would not pass big structures by copy.
Moreover, access parameters might be a better solution than heap allocation.

> Putting it another way, I can build a house with a steel hammer or a
> brass hammer. If I used a brass hammer I would be required to
> periodically grind it's head to make it true. The brass hammer is
> shiny, bright, and a real pleasure to look at, but lacks something in
> use. As (in my opinion) does Ada.
> 
Since you like hammer analogies, here is one from Booch, which in my 
view applies better to Ada:

"Give a power drill to a carpenter who never heard about electricity, 
and he will use it as a hammer.
He will hit his fingers and bend a few nails, because a power drill 
makes a lousy hammer"

-- 
---------------------------------------------------------
            J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  parent reply	other threads:[~2004-10-08 12:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 19:34 Ada Pointer Problem aschwarz1309
2004-10-02  0:47 ` Jeffrey Carter
2004-10-02 23:37   ` Randy Brukardt
2004-10-06 15:43     ` skidmarks
2004-10-06 18:19       ` Jeffrey Carter
2004-10-16  3:53         ` Benjamin Ketcham
2004-10-16 13:25           ` John B. Matthews
2004-10-18 18:09           ` Georg Bauhaus
2004-10-06 19:29       ` Georg Bauhaus
2004-10-07 18:45         ` skidmarks
2004-10-08  0:35           ` Jeffrey Carter
2004-10-08 12:02           ` Jean-Pierre Rosen [this message]
2004-10-08 16:58             ` Ludovic Brenta
2004-10-08 23:26             ` Björn Persson
2004-10-10 18:01             ` skidmarks
2004-10-08 14:03           ` Georg Bauhaus
2004-10-08 14:23           ` Dale Stanbrough
  -- strict thread matches above, loose matches on Subject: below --
2004-10-01 15:26 skidmarks
2004-10-01 15:50 ` David C. Hoos
2004-10-01 18:15   ` Jeffrey Carter
2004-10-01 17:24 ` Ludovic Brenta
replies disabled

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