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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b65fc33a05f24b6 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news2.euro.net!feeder4.cambrium.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng1.kpn.DE!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 05 Dec 2008 10:03:14 +0100 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A curiosity... References: <0f009ce8-0f50-4b85-9368-0d0c68f42da1@w34g2000yqm.googlegroups.com> In-Reply-To: <0f009ce8-0f50-4b85-9368-0d0c68f42da1@w34g2000yqm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4938ee5b$0$31327$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 05 Dec 2008 10:03:23 CET NNTP-Posting-Host: bd270313.newsspool4.arcor-online.net X-Trace: DXC=0]X_lkUP?Adf1oJaJ0@dmg4IUK Ludovic Brenta wrote: > Yes. In fact, C requires that pointers and integers be interchangable > so as to make address arithmetic "transparent" and extremely > dangerous. Uhm, not interchangeable has been pointed out; this also seems to be reflected in how Interfaces.C.Pointers is made. To me, a more significant difference is that we do have more predefined mechanism around Ada arrays. th + 100 is defined in C, it needs not designate an element of an allocated array, though (being off bounds, off the intended cell, whatever ...). and this is not checked. You get erroneous execution, or some kind of violation will kill the program if 100 happens to be too much. (C programmers might feel that they are more skilled when they do not rely on what they might call a cane: array bounds checking at run time, as is done in Ada and in C++/STL (with .at)... "The C language is alright, just pick real programmers!" is what I have heard now and then.) When you implement an Ada storage pool, can you rely on an Ada array to be mapped linearly to the sequence of hardware addresses? Is this important?