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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.31.131.69 with SMTP id f66mr11496291vkd.81.1505382582629; Thu, 14 Sep 2017 02:49:42 -0700 (PDT) X-Received: by 10.36.77.17 with SMTP id l17mr69883itb.7.1505382582578; Thu, 14 Sep 2017 02:49:42 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.etla.org!feeder.erje.net!2.us.feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!q8no196771qtb.0!news-out.google.com!c139ni576itb.0!nntp.google.com!127no23142itw.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 14 Sep 2017 02:49:42 -0700 (PDT) In-Reply-To: <81162546-cda1-4ea5-9455-78867693cd60@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1205:5055:3750:418:70a2:c936:6b1c; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:1205:5055:3750:418:70a2:c936:6b1c References: <4776d346-325b-4685-8ff4-ddb4ff6e08e3@googlegroups.com> <13b1d13e-38e5-44b7-9a79-e9b5cbb56b88@googlegroups.com> <847e4b1a-cb99-47fc-94b0-3ae61a07536e@googlegroups.com> <046666b7-6900-4de1-ba6d-0598ccdff6e9@googlegroups.com> <81162546-cda1-4ea5-9455-78867693cd60@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <04ec7e7e-c37e-4fc1-a79d-5924754a07e4@googlegroups.com> Subject: Re: use Ada.Text_IO in main() or Package? From: gautier_niouzes@hotmail.com Injection-Date: Thu, 14 Sep 2017 09:49:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:48127 Date: 2017-09-14T02:49:42-07:00 List-Id: Le jeudi 14 septembre 2017 11:37:41 UTC+2, Mace Ayres a =C3=A9crit=C2=A0: > Tks. It does make sense. I haven't been programming much in last decades,= never really go into OOP much, but I can see this is going to avoid a lot = of issues, and enforces some rigor. Actually it is just a question of what is depending on what. Instead of Structures, you can take Ada.Text_IO itself as an example. In the guts of package Ada.Text_IO, the GNAT run-time library has a package= body file: a-textio.adb) with the following lines: with Ada.Streams; use Ada.Streams; with Interfaces.C_Streams; use Interfaces.C_Streams; with System.File_IO; with System.CRTL; with System.WCh_Cnv; use System.WCh_Cnv; with System.WCh_Con; use System.WCh_Con; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; It makes sense they are there and not expected to be in any Main() or any o= ther referencing Ada.Text_IO. I've never used System.File_IO for instance and would not: it is GNAT only = and unknown in other Ada systems. And there is no need for that. G.