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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f57aba5273502edf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.149.210 with SMTP id u18mr1149740bkv.1.1335962285951; Wed, 02 May 2012 05:38:05 -0700 (PDT) Path: h15ni190273bkw.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Re: bindings with Ada 2012 aspects Date: Wed, 2 May 2012 12:38:05 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Date: Wed, 2 May 2012 12:38:05 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="Mda950WjNwNLAFOE7yJXQw"; logging-data="30570"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R8xFlEJ9H/Sb+4DHPEJrm" User-Agent: slrn/0.9.9p1 (FreeBSD) Cancel-Lock: sha1:A/3TOTmauNgY9VfLzYMljO+2VVo= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: 2012-05-02T12:38:05+00:00 List-Id: Hello, On 2012-04-26, Randy Brukardt wrote: > No language-defined aspects are allowed on renames, and the above is a > renames. > > The reason is that almost all language-defined aspects are the same for all > views of an entity, and a rename just introduces another view. Moreover, > this renames "trick" exists for pragmas simply to get around the limitations > of pragmas for overloaded entities, something that is totally unnecessary > for aspects. I'm sorry to derail this thread a bit, but this interesting description of renames makes we wonder even more why they are needed for public subprograms implemented by generic instantiation. Like the following: package Foo; procedure Bar (Arg_1 : in out Type_1; Arg_2 : in Type_2); end Foo; package body Foo generic type Formal_Type; with procedure Do_Stuff (Arg_2 : in Type_2); procedure Generic_Bar (Arg_1 : in out Formal_Type; Arg_2 : in Type_2); procedure Bar_Instance is new Generic_Bar (Type_1, Do_Real_Stuff); procedure Bar (Arg_1 : in out Type_1; Arg_2 : in Type_2) renames Bar_Instance; end Foo; What is so special about "just [introducing] another view" that cannot be achieved by the more direct code below? procedure Bar is new Generic_Bar (Type_1, Do_Real_Stuff); Thanks for your insights, Natasha