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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b860b4e8d00468ef X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <41249517.3000101@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada access vs C/C++ pointers and references References: <87657fso10.fsf@insalien.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 19 Aug 2004 11:55:08 GMT NNTP-Posting-Host: 209.165.3.133 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1092916508 209.165.3.133 (Thu, 19 Aug 2004 04:55:08 PDT) NNTP-Posting-Date: Thu, 19 Aug 2004 04:55:08 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:2848 Date: 2004-08-19T11:55:08+00:00 List-Id: 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 ======================================================================