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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5265ce03ee8f5252 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-06 12:54:41 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!newsgate.cistron.nl!codeine.org!fr.usenet-edu.net!usenet-edu.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Ok sorry, it is just a book gives no feedback. Date: Sat, 06 Jan 2001 20:36:48 GMT Organization: Deja.com Message-ID: <937vl0$5gs$1@nnrp1.deja.com> References: <931r2l$4ai5t$2@ID-25716.news.dfncis.de> <931t08$5u5$1@nnrp1.deja.com> <932632$e0e$1@nnrp1.deja.com> <932an8$ijs$1@nnrp1.deja.com> <93421h$2ju$1@nnrp1.deja.com> <934j5c$eu9$1@nnrp1.deja.com> <86hf3c5ure.fsf@acm.org> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Sat Jan 06 20:36:48 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x52.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3719 Date: 2001-01-06T20:36:48+00:00 List-Id: In article <86hf3c5ure.fsf@acm.org>, Laurent Guerby wrote: > The trick is to use pragma Import in Pure units to import > "unpure" debugging stuff without withing it. Sshhhh! This is a secret trick that should not be revealed to the uninitiated :-) :-) Few Ada programmers realize what a huge hole this is in the language (introduced in Ada 95 with the formal recognition of Ada as a convention). You can do all *sorts* of things by using pragma Import and Export with convention Ada. You can completely disconnect type checking at the subprogram call interface. You can compeltely disconnect elaboration order checking in elaboration code etc. You can also bypass any "silly" rules that you don't like about what you can and cannot WITH. I wonder whether we realized what a big hole we were creating there. I very seldom favor absolute rules in coding standards, so I hesitate to say *never* use convention Ada in this manner, but for sure you have to be super careful, it is as bad or worse than any of the unchecked interfaces in the language, and does not clearly announce itself, since the Import can be buried deep in the implementation code. Sent via Deja.com http://www.deja.com/