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,c4ba91f4ae36a2c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!xmission!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Elaborate_All on child package Date: Tue, 06 Sep 2011 10:23:54 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <19a85f93-3cd2-4054-8022-21ba294d53e3@glegroupsg2000goo.googlegroups.com> <507f7b91-0fab-4f62-86e1-8185aff2315c@glegroupsg2000goo.googlegroups.com> <9cmmh0Fm55U1@mid.individual.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1315319035 28350 192.74.137.71 (6 Sep 2011 14:23:55 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 6 Sep 2011 14:23:55 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:mjjK+T4z1R29VJH4VrKZ8JMfl4M= Xref: g2news1.google.com comp.lang.ada:20861 Date: 2011-09-06T10:23:54-04:00 List-Id: Niklas Holsti writes: > Robert A Duff wrote: > >> Right. The visibility rules in context clauses are special. >> They have to be, because the context clause are determining what's >> visible elsewhere. Why Jean Ichbiah chose this exact design, >> I don't know. I would have put the 'with' clauses inside the >> package. > > If the 'with' clauses would be inside the package, you would have to > change also the location of the generic formals for generic packages, > wouldn't you? The declarations of the formals should be able to refer to > entities in 'withed' packages. You wouldn't have to, but you'd want to. Note that Ada has always allowed forward references: generic type Formal_Type is (<>); with procedure P (X : My_Generic.Formal_Type); <-- This is legal! package My_Generic is end My_Generic; which is a bit strange, given that Ada doesn't allow forward references in general. Anyway, generic formal parameters are analogous to a procedure's formal parameters -- in both cases, they ought to come after the name of the thing being declared. - Bob