From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,efe381d5ed2da234 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!134.158.69.22.MISMATCH!in2p3.fr!oleane.net!oleane!skymaster!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Ada Pointer Problem Date: Fri, 08 Oct 2004 14:02:52 +0200 Organization: Adalog Message-ID: References: <7KadnU33z-bmpsLcRVn-og@megapath.net> <35f054ea.0410060743.7b73aac3@posting.google.com> <35f054ea.0410071045.58d3e9af@posting.google.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: s5.feed.news.oleane.net 1097237139 23890 195.25.228.57 (8 Oct 2004 12:05:39 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 8 Oct 2004 12:05:39 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.2) Gecko/20040803 X-Accept-Language: fr-fr, en-us, en In-Reply-To: <35f054ea.0410071045.58d3e9af@posting.google.com> Xref: g2news1.google.com comp.lang.ada:4920 Date: 2004-10-08T14:02:52+02:00 List-Id: skidmarks a =E9crit : > 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.=20 Well, this may be intensional for pointers, because Ada pointers are=20 really different from pointers in other languages. But it is certainly=20 not true of other terms. For example, "Task" was the common accepted=20 name for concurrent activities. The term "thread" was introduced much lat= er. > [...] 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=20 say, otherwise there would be no benefit in using Ada. True enough, the=20 programmer used to other languages does not find the one to one mapping=20 he would find with other languages. Ada is for industrial projects, and for providing a different view of=20 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=20 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=20 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=20 compiler would not pass big structures by copy. Moreover, access parameters might be a better solution than heap allocati= on. > 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. >=20 Since you like hammer analogies, here is one from Booch, which in my=20 view applies better to Ada: "Give a power drill to a carpenter who never heard about electricity,=20 and he will use it as a hammer. He will hit his fingers and bend a few nails, because a power drill=20 makes a lousy hammer" --=20 --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr