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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.146.212 with SMTP id u203mr3405368iod.27.1523622869400; Fri, 13 Apr 2018 05:34:29 -0700 (PDT) X-Received: by 2002:a9d:4794:: with SMTP id b20-v6mr207604otf.12.1523622869201; Fri, 13 Apr 2018 05:34:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feed.usenet.farm!feeder3.feed.usenet.farm!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!e130-v6no471588itb.0!news-out.google.com!u64-v6ni983itb.0!nntp.google.com!e130-v6no471586itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 13 Apr 2018 05:34:28 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.154.191.172; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 82.154.191.172 References: <115d2e72-2b30-4ec0-b42f-52e9df2905d4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: no, it can't be, there's no "with procedure instance_of_generic_procedure is new generic_procedure;" ? Impossible ! From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Fri, 13 Apr 2018 12:34:29 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3587 X-Received-Body-CRC: 529801022 Xref: reader02.eternal-september.org comp.lang.ada:51471 Date: 2018-04-13T05:34:28-07:00 List-Id: It was lost in the huge list of meaningless stuff... I read it, and LOVE IT= . Everything is clear from the get-go. But I do have some comments and sugg= estions. Probably you will find them silly or unrealistic, but please bear = with it and tell me your opinion. >From your AI the only thing I=E2=80=99m not a huge fan of, is the use of ..= . "USE". I'll make them here, so that people might review them and scold me on how s= illy I am (I'm prepared, it's ok...). 1) defaults for types themselves=C2=A0: Type Item_type is private or use some_known_type; Anything might be p= rovided in default or by the user, but the generic might only use the prope= rties mentioned in the contract (here, being definite, non-limited and non-= abstract). Honestly why isn't it already allowed ? Implementation hurdle ? 2) with Package Object_Stack is new Generic_Stack(PostScript_Object) or use Generic_stack (Postscript_object); Granted this one=E2=80=99s not perfect: there's a repetition, but it doesn'= t say exactly the same: first "generic_stack(...)" is a contract, the secon= d one is the default indication. I stumbled on the rule =C2=AB=C2=A0It is all or nothing: if you specify the= generic parameters, you must specify all of them. Similarly, if you specif= y no parameters and no box, then all the generic formal parameters of Q mus= t have defaults. The actual package must, of course, match these constraint= s.=C2=A0=C2=BB (ada wikibook). I don=E2=80=99t know why they set that=E2=80= =A6 How would that be difficult to implement to allow some parameters to be= given or others let to default, provided named association is used for bot= h kinds, to remove any ambiguity=C2=A0? IF that rule could disappear, one could write=C2=A0: with package Object_Stack is new Generic_Stack(Item_type =3D> PostScript_Ob= ject, others =3D> <> [others parameters let to default] or use Generic_Sta= ck([complete parameters list here]) or=C2=A0: with package Object_Stack is new Generic_Stack(others =3D> <> [or simply <>= ]) or use Generic_Stack(=E2=80=A6)=C2=A0; Much more useful than before.