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.0 required=5.0 tests=BAYES_00,FORGED_HOTMAIL_RCVD2, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6aa1ec264ce25142 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.129.81 with SMTP id n17mr55553bks.3.1346225693521; Wed, 29 Aug 2012 00:34:53 -0700 (PDT) Received: by 10.224.180.205 with SMTP id bv13mr626408qab.8.1346225693313; Wed, 29 Aug 2012 00:34:53 -0700 (PDT) Received: by 10.52.34.115 with SMTP id y19mr28829vdi.1.1346225693209; Wed, 29 Aug 2012 00:34:53 -0700 (PDT) Path: m12ni146610bkm.0!nntp.google.com!news1.google.com!r1no2708267qas.0!news-out.google.com!da15ni48885608qab.0!nntp.google.com!r1no2708255qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 29 Aug 2012 00:34:53 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.71.180.107; posting-account=P68zsgoAAABKpXKMUuwuUZ_RfBk1kZfB NNTP-Posting-Host: 193.71.180.107 References: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> <289703e7-1fba-41ce-b781-9e58ff2ec7df@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Real syntax problems in Ada From: =?ISO-8859-1?Q?Egil_H=F8vik?= Injection-Date: Wed, 29 Aug 2012 07:34:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-08-29T00:34:53-07:00 List-Id: On Tuesday, August 28, 2012 11:49:20 PM UTC+2, Randy Brukardt wrote: > I feel that way too, but there is a semantic reason why this isn't possible. > Specifically, the part after the "is" of a type declaration is a "type > definition". These are anonymous and can appear in various other contexts > (anonymous array and access types, for instance). The name of a type comes > from the type declaration, which is a separate semantic entity (and has > subtly different rules). I know that Janus/Ada processes "type definitions" > separately from the declarations, and thus including a name in the anonymous > part would be difficult to manage. > > I once seriously looked at proposing allowing a name in a record type > declaration, and I couldn't figure out a reasonable way to do so given the > existing Ada semantics. Figuring out some way to hack the wording so that > the name associated with the declaration somehow can be matched in the > definition would seem to require changes all over the standard all out of > proportion to the size of the problem. So I don't think this is ever going > to happen. We can already use the name of a type inside it's own type definition to denote the current instance of the type, so there must already be some link between type declarations and type definitions, even in Janus/Ada. The most famous example of this, is probably the Rosen Trick. Allowing the type name at the end of the record definition can't be that much more different from allowing it inside the record definition? (I'm not a compiler writer, so I may have missed a few nuances here. Please enlighten me) -- ~egilhh