comp.lang.ada
 help / color / mirror / Atom feed
From: "Warren W. Gay VE3WWG" <ve3wwg@home.com>
Subject: Re: Ada and pointers
Date: Wed, 15 Aug 2001 16:25:32 GMT
Date: 2001-08-15T16:25:32+00:00	[thread overview]
Message-ID: <3B7AA27C.57122504@home.com> (raw)
In-Reply-To: fb75c450.0108150449.11fe4c74@posting.google.com

Hambut wrote:
> Tony Gair <tony@blueyonder.co.uk> wrote in message news:<1ope7.5943$6R6.582900@news1.cableinet.net>...
> 
> <snip>
> 
> > 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



  parent reply	other threads:[~2001-08-15 16:25 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
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 [this message]
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