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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!postnews3.readnews.com!not-for-mail Date: Thu, 03 Mar 2011 00:48:25 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <31c357bd-c8dc-4583-a454-86d9c579e5f4@m13g2000yqb.googlegroups.com> <05a3673e-fb97-449c-94ed-1139eb085c32@x1g2000yqb.googlegroups.com> <4d4c232a$0$28967$882e7ee2@usenet-news.net> <4D4D6506.50909@obry.net> <4d50095f$0$22393$882e7ee2@usenet-news.net> <4d6d56c4$0$11509$882e7ee2@usenet-news.net> <4D6D6A90.2090108@obry.net> <4d6d6e60$0$11509$882e7ee2@usenet-news.net> <4d6e53c1$0$21954$882e7ee2@usenet-news.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4d6f2bb3$0$14547$882e7ee2@usenet-news.net> NNTP-Posting-Host: bbfafcd7.usenet-news.net X-Trace: DXC=b@h0c3]HFf`;28JD7i9ejk^oXGM_6\KV`mX0AG3X_jUod2X8V[>OoAfUDJR]nRiFOl`40[fPeBVEa^O?X2KSlI0d;jPfRHRcDDb X-Complaints-To: abuse@usenet-news.net Xref: g2news2.google.com comp.lang.ada:18729 Date: 2011-03-03T00:48:25-05:00 List-Id: On 3/2/2011 9:23 PM, Randy Brukardt wrote: > You might remember when I referred to "98% of code being garbage, including > most Ada code" (for which you called me a "crank"). 98% is pretty cranky :-) > Specifically, when you use "pragma Import" in Ada code, you are telling the > Ada compiler what the other side expects for parameter types, number of > parameters, and the like. There can be no check that these declarations are > correct, in Ada or in the other language. (At least not unless you are the > compiler vendor for both languages, a highly unlikely situation for most of > us.) The effect is that any error in these specifications causes random > behavior that is often very difficult to trace to the actual mistake. That's no longer (always) true - compiled files and libraries now come augmented with type information, so in fact interface errors will be caught even across language boundaries. That's true for "mangled" C++ names as well as Java class files and .net assemblies and type libraries. Plain old C is probably in the worst position here, since the lack of overloading and the need for backward compatibility means that compiled C code may lack type information.