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-7-bit Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!news.zanker.org!npeer.de.kpn-eurorings.net!proxad.net!oleane.net!oleane!newsfeed-00.mathworks.com!lon-transit.news.telstra.net!lon-in.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!53ab2750!not-for-mail From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: Ada Pointer Problem References: <7KadnU33z-bmpsLcRVn-og@megapath.net> <35f054ea.0410060743.7b73aac3@posting.google.com> <35f054ea.0410071045.58d3e9af@posting.google.com> User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) Message-ID: Date: Fri, 08 Oct 2004 14:23:40 GMT NNTP-Posting-Host: 138.217.18.112 X-Complaints-To: abuse@bigpond.net.au X-Trace: news-server.bigpond.net.au 1097245420 138.217.18.112 (Sat, 09 Oct 2004 00:23:40 EST) NNTP-Posting-Date: Sat, 09 Oct 2004 00:23:40 EST Organization: BigPond Internet Services Xref: g2news1.google.com comp.lang.ada:4925 Date: 2004-10-08T14:23:40+00:00 List-Id: skidmarks wrote: > 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. This is a load of rubbish. Scalars are passed by copy in-copy out. Other objects are passed in a manner that the compiler thinks will be efficient. For almost any array and record that will be by reference. > 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. You can't use a language without knowing it. If you think it should work like all the other languages you know, then use them. Seems simpler to me. If you are not prepared to read the instructions before use, you shouldn't be surprised if something breaks. Dale -- dstanbro@spam.o.matic.bigpond.net.au