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, LOTS_OF_MONEY 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-16 06:45:02 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!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: Thu, 16 Aug 2001 09:37:58 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9lgibn$ak1$1@nh.pace.co.uk> References: <9ldto7$9pg$1@nh.pace.co.uk> <9lei8f$gmu$1@houston.jhuapl.edu> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 997969079 10881 136.170.200.133 (16 Aug 2001 13:37:59 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 16 Aug 2001 13:37: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:11987 Date: 2001-08-16T13:37:59+00:00 List-Id: Why would you find it difficult to believe? I'm not claiming that you can take any algorithm that uses dynamic memory allocation and/or pointers and *easily* translate it into an equivalent algorithm using a static array and indexes. I'm not saying that such a translation wouldn't be prone to all sorts of error and abuse. I'm also not saying that the equivalent translation would be at all sound software engineering. What I'm saying is that it seems obvious that any dynamic allocation/pointer algorithm *must have* somewhere in the known universe, a parallel algorithm that relies only on a static array and integer index. Why? Because that's all a computer has for memory and somehow a compiler finds that equivalent algorithm or it couldn't possibly build you an image that would execute. It sounds to me like you think I'm claiming that people should translate their linked list programs into array implementations - or that trying to do so would be a good thing. This is not my claim at all. 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/ "Tony Gair" wrote in message news:DBFe7.12766$6R6.1217641@news1.cableinet.net... > > > > >> 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. > >> > > I find it difiicult to believe that this is obvious in any way. > It also dismisses the point of programmer error, none of us are infallible > and its when some of us assume we are infallible and source omnipotent that > our greatest and most widely known screw ups strike >