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.36.68.196 with SMTP id o187mr2225017ita.41.1519925841252; Thu, 01 Mar 2018 09:37:21 -0800 (PST) X-Received: by 10.157.68.9 with SMTP id u9mr124995ote.5.1519925841161; Thu, 01 Mar 2018 09:37:21 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!e10no596002itf.0!news-out.google.com!a2ni3402ite.0!nntp.google.com!w142no1171868ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 1 Mar 2018 09:37:20 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <55cd79f5-4b37-4b08-b292-073ed2f37021@googlegroups.com> <15c49c4e-726a-4fd7-bf35-c7d27ff9a491@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3361a969-7deb-4a1a-9dd6-c6354f9b5348@googlegroups.com> Subject: Re: body stub not allowed in inner scope From: Shark8 Injection-Date: Thu, 01 Mar 2018 17:37:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2816 X-Received-Body-CRC: 273681119 Xref: reader02.eternal-september.org comp.lang.ada:50756 Date: 2018-03-01T09:37:20-08:00 List-Id: On Wednesday, February 28, 2018 at 4:23:32 PM UTC-7, Randy Brukardt wrote: > "Mehdi Saada" wrote in message=20 > news:15c49c4e-726a-4fd7-bf35-c7d27ff9a491... > > Thanks. > > But that's ugly... How about fixing this for the next norm ? >=20 > Does anyone other than ACATS tests actually use stubs these days? Why? I do, sometimes. Usually to put a particularly knotty or verbose chunk of code. For example,= in an interpreter I was writing I put all the operators, which 'explodes' = (m*n; m =3D #types, n =3D #operators) based on the number of internal types= , in their own package and made the body separate. I've also used it with parsing & stream-I/O functions: Function Parse( Text : String ) return Program; Function Parse( Text : String ) return Program is Separate; Procedure Read( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : out T) is Separate; > (We used to use them extensively, but only because Janus/Ada on 16-bit MS= -DOS=20 > limited a single unit to 64K of generated code -- and our editors couldn'= t=20 > handle more than 256K of source code at a time. None of that makes sense= =20 > today.) This is true; but it does make sense for organizing and isolating portions = of the codebase even further w/o having to muck up the library-hierarchy...= and might be required at a certain level (eg primitive ops).