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: a07f3367d7,13aaae984988cb0d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!postnews.google.com!c3g2000yqd.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Yannick_Duch=EAne_Hibou57?= Newsgroups: comp.lang.ada Subject: Re: Discriminant and type extensions Date: Thu, 8 Oct 2009 23:29:20 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8e6cbd59-03d2-4152-9585-7b6a97916f55@c3g2000yqd.googlegroups.com> References: <2b205c63-55e7-4cef-95d2-5b0ece0b8866@p9g2000vbl.googlegroups.com> NNTP-Posting-Host: 77.198.58.110 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1255069760 28504 127.0.0.1 (9 Oct 2009 06:29:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 9 Oct 2009 06:29:20 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c3g2000yqd.googlegroups.com; posting-host=77.198.58.110; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8630 Date: 2009-10-08T23:29:20-07:00 List-Id: On 6 oct, 00:15, Yannick Duch=EAne Hibou57 wrote: > For procedures and functions, the Renames clause may do the thing > (explicitly re-introducing procedures and functions in the scope), but > for discriminants in this kind of context, I do not know a way. > Perhaps I do not know it, or perhaps this may be a candidate proposal. While this can be a bit dangerous too. Today I've faced an unintelligible confusing bug. It was due to erroneously edited copy/ paste done while importing some entities in a current scope from the scope of an instantiated packages. If only there was a way to check that both parts of a rename clause use the same name. Like checking that in =93 NameX Declaration renames PackageY.NameX =94 both NameX are the same. Is it a famous practice ? If it is enough, a syntax to check it, based on existing reserve words would not be syntactic sugar, this would be really useful check. Why not reuse the For/Use pre-existing keywords ? To have something like =93 for NameX Declaration use PackageY.NameX =94. This may not conflict with a representation clause. Or it may ?