comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: Ada and pointers
Date: Thu, 16 Aug 2001 09:37:58 -0400
Date: 2001-08-16T13:37:59+00:00	[thread overview]
Message-ID: <9lgibn$ak1$1@nh.pace.co.uk> (raw)
In-Reply-To: DBFe7.12766$6R6.1217641@news1.cableinet.net

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" <tony@blueyonder.co.uk> 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
>






  reply	other threads:[~2001-08-16 13:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-13  7:05 How Ada could have prevented the Red Code distributed denial of service attack Gautier Write-only-address
2001-08-15  7:19 ` Ada and pointers Tony Gair
2001-08-15 12:49   ` Hambut
2001-08-15 13:33     ` Marin David Condic
2001-08-15 12:57       ` Jonathan DeSena
2001-08-16  1:46         ` Tony Gair
2001-08-16 13:37           ` Marin David Condic [this message]
2001-08-16 15:43             ` Darren New
2001-08-16 16:29               ` James Rogers
2001-08-16 16:56                 ` Darren New
2001-08-17 14:58                   ` Ted Dennison
2001-08-17 17:14                     ` Darren New
2001-08-15 16:02       ` James Rogers
2001-08-15 17:16         ` Marin David Condic
2001-08-15 19:52           ` James Rogers
2001-08-15 21:00             ` Marin David Condic
2001-08-15 18:54       ` Hambut
2001-08-15 19:53         ` Marin David Condic
2001-08-16  8:25           ` Hambut
2001-08-15 16:25     ` Warren W. Gay VE3WWG
2001-08-15 13:37   ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox