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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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 06:45:11 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news-x2.support.nl!news-x.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Ada and pointers Date: Wed, 15 Aug 2001 09:33:58 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9ldto7$9pg$1@nh.pace.co.uk> References: <1ope7.5943$6R6.582900@news1.cableinet.net> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 997882439 10032 136.170.200.133 (15 Aug 2001 13:33:59 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 15 Aug 2001 13:33:59 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:11948 Date: 2001-08-15T13:33:59+00:00 List-Id: Well, the statement is true enough because after all, dynamic allocation and the things done by pointers are really a kind of fiction. Memory is basically one big array that you index with integers, so obviously, a non-dynamic/non-pointer solution must exist. Anything you do with pointers could be implemented with a one dimensional array and integer indexes - because that's what the compiler translates it into. However, that doesn't mean that one should avoid access types in all cases. Sometimes it is the most natural expression of the solution. Its just that you should generally use them sparingly and isolate them as best you can. Ada lets you do this rather well. (Some OOP-style programming relies heavily on access types so you've got to make design trade offs - use the OOP for its benefits at the risk of having lots more pointers flying around or avoid/isolate the pointers and implement a solution that may not be as extensible.) Access types aren't a "bad" thing - you just don't want to be forced into using them at every conceivable turn as you must in C/C++. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Hambut" wrote in message news:fb75c450.0108150449.11fe4c74@posting.google.com... > 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.