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: Wed, 15 Aug 2001 09:33:58 -0400
Date: 2001-08-15T13:33:59+00:00	[thread overview]
Message-ID: <9ldto7$9pg$1@nh.pace.co.uk> (raw)
In-Reply-To: fb75c450.0108150449.11fe4c74@posting.google.com

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" <hfrumblefoot@yahoo.com> wrote in message
news:fb75c450.0108150449.11fe4c74@posting.google.com...
> 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.





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