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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-15 09:25:33 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!east1.newsfeed.sprint-canada.net!news.storm.ca!nnrp1.tor.metronet.ca!not-for-mail Message-ID: <3B7AA27C.57122504@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada and pointers References: <1ope7.5943$6R6.582900@news1.cableinet.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 15 Aug 2001 16:25:32 GMT NNTP-Posting-Host: 198.96.47.195 NNTP-Posting-Date: Wed, 15 Aug 2001 10:25:32 MDT Organization: MetroNet Communications Group Inc. Xref: archiver1.google.com comp.lang.ada:11953 Date: 2001-08-15T16:25:32+00:00 List-Id: Hambut wrote: > Tony Gair wrote in message news:<1ope7.5943$6R6.582900@news1.cableinet.net>... > > > > > Incidently I heard a statement by a colleague ten years ago saying pointers > > are not actually necessary in any construction of code no-matter the > > purpose because it had been mathematically proven so". A very strong > > statement.... has anyone heard of this or was it hot air, > > > > Seems a bit too strong. It strikes me that explicitly getting rid of > pointers (or access types) would just move the problems elsewhere.. > you'd still have all the nasty keeping track of references issues, > they'd just be transposed to, say, an array construct. I agree. Whether they be "pointers", "references" or "subscripts", you can still mis-manage them. Though "smart references" that keep track of references to an object (as in Java) can improve your success rate ;-) However, if you must use pointers, then I think that eliminating pointer arithmetic eleminates an entire class of problems. Having array bounds checked, compliments this very well. As someone else pointed out, you can implement heaps in arrays etc. (this is why "subscripts" can be a problem). If you manage your heap in an array, the subscript becomes a pointer in effect, which can then allow the programmer step on other array elements in that array, thus affecting a different form of corruption. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg