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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,556e5b18154df788 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.20.239 with SMTP id q15mr1255551wie.7.1365342172698; Sun, 07 Apr 2013 06:42:52 -0700 (PDT) Path: ex12ni28532wid.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news.n-ix.net!news.hufnagl.info!fu-berlin.de!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Interresting, possibly buggy behavior in GNAT generics w/ expression function. Date: Tue, 2 Apr 2013 10:51:31 +0200 Organization: cbb software GmbH Message-ID: <1nrmzafa783kj.bcm8e5qfiiqi.dlg@40tude.net> References: <1k6ipbtagwzw4$.1dv47rfygcedg.dlg@40tude.net> <1ex3dm2hk2j54$.1uiyljwziv0hi$.dlg@40tude.net> <1ilubaaaex6jp$.zd9lslst85nn.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-04-02T10:51:31+02:00 List-Id: On Mon, 1 Apr 2013 19:52:10 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1ilubaaaex6jp$.zd9lslst85nn.dlg@40tude.net... >> You lumped together two different contracts. There is a contract on the >> actual parameters which is defined by be the formal parameters >> specification. Another contract is the generic package specification >> (public part), which is a contract for the clients using an instance of >> the package. > > No I didn't - I'm only talking about the contract of a generic unit. It is more than one contract because a generic unit is used in two completely different contexts: 1. Instantiation 2. Use of the instance > The > case in question is the meaning of "not overriding" in a generic > speecification. Uses of overriding indicators in a generic specification is > part of the contract of the generic, as are various other things (like > accessibility checks - it's easy to write a generic that can only be > instantiated at library level). Considering the contract #1 it is a language design error. This contract should be limited strictly to the formal part, IMO. Impossibility to achieve that is one of multiple problems all macro expansions have (Ada generics included). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de