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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5c1125c290d9dd14 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: ANN: Ada 2005 Math Extensions, 20100810 release Date: Sat, 14 Aug 2010 00:28:48 +0200 Organization: Ada At Home Message-ID: References: <15e1x67lls1pe$.sqnhbm59hwdz$.dlg@40tude.net> NNTP-Posting-Host: M2yP1Cx/h9YxW/Ct5b534Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.60 (Win32) Xref: g2news1.google.com comp.lang.ada:13250 Date: 2010-08-14T00:28:48+02:00 List-Id: Le Sat, 14 Aug 2010 00:04:17 +0200, Simon Wright a = = =C3=A9crit: >> Le Fri, 13 Aug 2010 21:50:07 +0200, Simon Wright = > Well, I couldn't see how Dmitry's "Foo_Of" would make sense as it was > being read. > > procedure P (Q : Generic_S.Foo_Of); -- huh? > > I suppose one could say > > generic > type Foo is ... > package Generic_S is > subtype Actual_Foo is Foo; I said too much less, sorry, so you could not understand what I was to s= ay I would rather write generic type Foo is ... package Generic_S is subtype Formal_Foo is Foo; The name is not the same as the one Dmitry suggested, while the principl= e = is the same : name formal parameter after the name their should have, an= d = use renamed subtype in the package (just the name vary, and indeed it = should be expressive and clear enough). > procedure P (Q : Generic_S.Foo_Of); -- huh? This would turn this into procedure P (Q : Generic_S.Foo_Of); which is also not so much used for me (do not know for others who live = with other cases in mind). The count of generic instantiations is bigger= = than the one reference to this Package_Name.Formal_Subtype, which by the= = way, mainly appears as generic parameters when needed, like =E2=80=9Cpac= kage = Blabla_Instance is new Generic_Blabla (Blabla_Base_Type =3D> = Instantiated_Package.Formal_Type);=E2=80=9D These Formal_Subtype_Name are most of time not part of what is provided = by = the package (otherwise, it would simply provide nothing except what = already exists), so as most of time not referenced when what the package= = provided is referenced (from the client side). But this may be required = to = make reference to a package's formal parameters with mixins (if I am not= = wrong, I had this requirement with some kind mixins). Pretty sure this is not so much referenced by clients, for the reason = given above, that this is not what a package mainly provides. This is mo= st = needed to link generic packages each others. So (providing the latter = assumption is OK), giving a proper name to formal parameters and only gi= ve = special names to subtype of these formals, is likely to avoid to have to= = deal with obfuscated names as much as possible.