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 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!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: Ada 2005 Math Extensions, 20100810 release Date: Fri, 13 Aug 2010 23:04:17 +0100 Organization: A noiseless patient Spider Message-ID: References: <15e1x67lls1pe$.sqnhbm59hwdz$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 13 Aug 2010 22:04:19 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="22686"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EsBH03a9+ktNlC15Ut9KIwM647yE3ljg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:J6vzd4qatewgHDb1NI9rwzRkAI0= sha1:Z/vT89tvJ4gMEpInLjyS98vrpK8= Xref: g2news1.google.com comp.lang.ada:13249 Date: 2010-08-13T23:04:17+01:00 List-Id: "Yannick Duchêne (Hibou57)" writes: > Le Fri, 13 Aug 2010 21:50:07 +0200, Simon Wright > a écrit: >> I've more often come across the latter. >> >> Could consider >> >> generic >> type Formal_Foo is ... >> package Generic_S is >> subtype Foo is Formal_Foo; >> > The trouble with this one, is that it move the case to the client > side... I would not like to generic instantiations “obfuscated” with > all of those Formal_Foo (I always use named parameter > associations... especially with generic instantiations). > > The Dmitry way, which is also the one I use, end to be less intrusive, > as the client of the generic package is less likely to have to spell > this somewhere (except if it/he/she has to use a formal parameter of > a given instantiated package to instantiate another). 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; (since we're adopting the "spelt-out prefix" style, Generic_, rather than the "abbreviated suffix" style, _G !) though I see that the last time I used it was the other way round .. generic type Actual_Foo is ... package Generic_S is subtype Foo is Actual_Foo;