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,c3c4ae45442f569e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!news2.google.com!proxad.net!proxad.net!infeed-2.proxad.net!news5-e.free.fr!not-for-mail Date: Fri, 29 Apr 2005 23:23:30 +0200 From: Lionel Draghi User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.7) Gecko/20050420 Debian/1.7.7-2 X-Accept-Language: fr-fr, en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada.Text_IO and protected objects (Was: [newbie question] tasks and protected types) References: <1114747457.868019.93210@f14g2000cwb.googlegroups.com> <42720DCD.6030304@mailinator.com> <4272260d$0$30463$ba620e4c@news.skynet.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4272a5ce$0$15359$636a15ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 29 Apr 2005 23:23:26 MEST NNTP-Posting-Host: 82.236.216.140 X-Trace: 1114809806 news5-e.free.fr 15359 82.236.216.140:60676 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:10838 Date: 2005-04-29T23:23:26+02:00 List-Id: Randy Brukardt a �crit : ... > > I think it actually does work in Janus/Ada and in GNAT, but (in our case at > least), we aren't making any promises that that will remain the case. And > its always bad practice to write code that will work only on a few > compilers, especially something as hard to track down as this would be. I fully agree with you, Randy, but it's quite difficult to ensure that no compiler dependant behavior is used in the code, because no compiler I am aware of is kind enough to put a warning on all compiler/platform dependencies. When porting, some problems will be caught at compilation time (for example representation clause that do not compile with another compiler). Some will be caught early at run time (for example elaboration order issue). But some, like this one, may not be noticed before delivery, and will be really difficult to track down, as you said. And here is the limit of Ada portability Myth. OK, Ada is probably the most portable industrial compiled language. OK, porting an Ada code is much faster than any other compiled language. But the situation is not perfect. Ada is just 99.5% portable :-) Those "inaccuracy" in the Ada semantics are possibly inevitable, precisely because of portability accross platform, and maybe also to preserve different compiler implementation options. So, the only way I see to ensure that an general Ada code is fully portable is an ASIS tools that will warn about all risky code. A kind of portability lint. What dou you think about it? -- Lionel Draghi