comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <nobody@noplace.com>
Subject: Re: Ada access vs C/C++ pointers and references
Date: Thu, 19 Aug 2004 11:55:08 GMT
Date: 2004-08-19T11:55:08+00:00	[thread overview]
Message-ID: <41249517.3000101@noplace.com> (raw)
In-Reply-To: cg1gtp$23u$1@hercules.btinternet.com

Pretty much the same story here. Note that "needing" pointer arithmetic 
is probably a purely perceptual thing. "I'm used to doing it this way 
and my particular C compiler gets rid of half of an instruction per 
million by doing so and now I believe my code is ultra-fast and I 
*can't* live without it in some slow, inefficient language that won't 
let me march blindly through memory..."

Computers are actually pretty good at doing their own address 
arithmetic, so I choose not to try to take on their job and leave them 
unemployed, out on the street, stealing hubcaps and smoking marajuana.

In *some* raw bootstrap code where you are doing health checks (making 
sure address lines work, memory parity checks work, etc.) you do some 
direct address manipulation. (You also do a *lot* of other things you 
wouldn't normally do in the application software!) Typically, you dip 
into assembler to do this anyway because a) you can't get there directly 
in Ada (or most other languages I know of) without writing machine code 
routines anyway and b) Ada's elaboration rules often get in the way when 
you're coming up from a raw power-up.

MDC

Martin Dowie wrote:
> 
> 
> I also work in avionics (have done for 16 years now) and I've
> _never_ needed pointer arithmatic - there's usually a 'better'
> Ada way that produces acceptably fast results. But YMMV :-)
> 



-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Power corrupts.  Absolute power is kind of neat"
         -- John Lehman, Secretary of the Navy 1981-1987
======================================================================




  reply	other threads:[~2004-08-19 11:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-18 22:27 Ada access vs C/C++ pointers and references Keith H Duggar
2004-08-19  0:21 ` Nick Roberts
2004-08-19 11:42   ` Marin David Condic
2004-08-19  0:29 ` Jim Rogers
2004-08-19  5:19 ` Ludovic Brenta
2004-08-19  6:21   ` Martin Dowie
2004-08-19 11:55     ` Marin David Condic [this message]
2004-08-19 18:01     ` Ludovic Brenta
2004-08-19  7:19   ` j
2004-08-19  7:42     ` Martin Dowie
2004-08-19 12:03     ` Marin David Condic
2004-08-19  7:59 ` Ole-Hjalmar Kristensen
2004-08-19 15:33   ` Keith H Duggar
2004-08-19 21:32     ` Ludovic Brenta
2004-08-19 22:18       ` Hyman Rosen
2004-08-20  7:52     ` Ole-Hjalmar Kristensen
2004-08-19  8:11 ` Dmitry A. Kazakov
replies disabled

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