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,f57aba5273502edf X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.223.40 with SMTP id qr8mr789155pbc.0.1336003821114; Wed, 02 May 2012 17:10:21 -0700 (PDT) MIME-Version: 1.0 Path: r9ni125278pbh.0!nntp.google.com!news1.google.com!goblin2!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: bindings with Ada 2012 aspects Date: Wed, 2 May 2012 19:10:15 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1336003818 646 69.95.181.76 (3 May 2012 00:10:18 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 3 May 2012 00:10:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-05-02T19:10:15-05:00 List-Id: "Natasha Kerensikova" wrote in message news:slrnjq2ake.1lme.lithiumcat@sigil.instinctive.eu... ... > 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); This is a "renames-as-body", and it causes problems because you might have conflicts between the aspects that are defined (explicitly or implicity) for the specification, and those that are defined for the instance by the generic definition. Other kinds of renames-as-body have fewer problems with this. You're *never* allowed to specify language-defined aspects on a body (of any kind) [which is more about the original topic than your question]. In this specific case of Janus/Ada, the actual call profile of a generic instantiation is different than the call profile of a non-generic subprogram with the same set of parameters. So to make this work, there has to be a wrapper or some other "connector" generated. Other implementations also have various issues with this. This is a lots of work, and it was never felt that this was common enough that allowing it would make any real difference. That's because the vast majority of generic units are packages, and this would do nothing to help for a generic package instantiation. Maybe that judgement was wrong; but even if the language was changed this would be low priority to change in Janus/Ada simply because it would be a lot of work, and there are many other projects which would have more benefit to our customers than this one. It should be noted that this was decided during Ada 95, and it never has been revisited since (to my knowledge), so perhaps it would make some sense to revisit this for Ada 2020. Randy.