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,c4ba91f4ae36a2c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!b20g2000vbz.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Elaborate_All on child package Date: Tue, 6 Sep 2011 22:03:35 -0700 (PDT) Organization: http://groups.google.com 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: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1315371900 8901 127.0.0.1 (7 Sep 2011 05:05:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 7 Sep 2011 05:05:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b20g2000vbz.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:6.0.1) Gecko/20100101 Firefox/6.0.1,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20867 Date: 2011-09-06T22:03:35-07:00 List-Id: > Robert A Duff wrote: > >> Right. =A0The visibility rules in context clauses are special. >> They have to be, because the context clause are determining what's >> visible elsewhere. =A0Why Jean Ichbiah chose this exact design, >> I don't know. =A0I would have put the 'with' clauses inside the >> package. I guess he wanted them to stand out and not be hidden somewhere inside. > Note that Ada has always allowed forward references: > > generic > =A0 =A0type Formal_Type is (<>); > =A0 =A0with procedure P (X : My_Generic.Formal_Type); =A0<-- This is lega= l! > 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. Perhaps. I guess this special syntax was used because of the different kind of parameters. In Ada 83, there were no subprogram parameters, so since for generics, there are these kind of formals, Ichbiah chose special syntax. Today, with subprogram parameters existing (but still no type parameters), syntax decisions could have been different. (I gather, with all the syntax and semantics discussions in this group, we would have at least 100 different Adas if we were to start from scratch.)