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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Bj=c3=b6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: Put the access value Date: Thu, 23 Apr 2020 13:37:19 +0200 Organization: A noiseless patient Spider Message-ID: References: <5e956327$0$1635$e4fe514c@news.kpn.nl> <5e95a814$0$1701$e4fe514c@news.kpn.nl> <7cef829e-430e-4dec-b12d-f13edfd86ebc@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 23 Apr 2020 11:37:19 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1687de0bbb044c89b76d2141b55fa11b"; logging-data="10811"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4/ntJYEfoHFTV7H2wCUkK" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 Cancel-Lock: sha1:2JRepZUiks9FYjMuRM/muBXN2xE= In-Reply-To: <7cef829e-430e-4dec-b12d-f13edfd86ebc@googlegroups.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58471 Date: 2020-04-23T13:37:19+02:00 List-Id: Den 2020-04-22 kl. 19:33, skrev AdaMagica: > Am Mittwoch, 22. April 2020 14:31:11 UTC+2 schrieb björn lundin: >> I do agree, but the tone of AdaMagica is more like a professor telling a >> student what to do or not. > > I appoligize if my answer made this impression - this was not my intent. Through the written media it is sometimes hard to express intonations and it is sometimes hard to interpret the underlying tone of a message. I could have been more forgiving in my reply, and it is nice to know that the tone i read into it was not there. > My thinking was: Someone not using GNAT might think "Oh, that's nice, I'll remember" and later "WTF? Isn't Ada always praised for its portability?" Well that is true only so far. While i do agree with Randy that is is good to state the compiler, I don't think failure to do so should be rewarded with a 'you should have done that' And is it really enough to say it's gnat? I don't think the version of the language was mentioned (83/95/05/12/15/2x) (does both 15 and 12 exist?) I have had case where my collegues used 'Img (gnat-specifik) and then changed it to 'Image - part of a newer standard - for portability. Then that code has been moved to another project, where it fails to compile. That used gnat 7.4.2, which is 2012. but not 2015. And only the gnat specific attribute works there. And here I hear people say 'use type'image(varible) instead. But I do think Assignment_Id'image or Assignment_Id'Img is nicer than with Core_Types ... Core_Types.Assignment_Identity_Type'Image(Assignment_Id) which we did before to log out an Assignment_Id Another thing if working with operating system is the compiler's runtime tasking model. A piece of code using blocking calls for I/O in a thread will work well on implementations mapping tasks to os-threads, but will block the whole process if the tasking is made by the compiler runtime. Alysy Ada did that on AIX (Ada 83). And I think Janus as well. Object Ada (I think) and Gnat does not. There are likely other things that break portability So, should one state language version and runtime behaviour too? > And there is that habit of many equalling GNAT and Ada (for instance claiming that body files must have the extension adb - even with GNAT, that isn't the case). Yes, and that is unfortunate. But critisizing other helpful posts does not change that. If the OP would have tried the gnat-specific advice given, and failed, he/she would likely have come back and said 'no good' -- Björn