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,6aa1ec264ce25142 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.96.42 with SMTP id dp10mr2650913wib.2.1346190559862; Tue, 28 Aug 2012 14:49:19 -0700 (PDT) MIME-Version: 1.0 From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Real syntax problems in Ada Date: Tue, 28 Aug 2012 16:49:12 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> <289703e7-1fba-41ce-b781-9e58ff2ec7df@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1346190557 19238 69.95.181.76 (28 Aug 2012 21:49:17 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 28 Aug 2012 21:49:17 +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 Path: q11ni364561599wiw.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail Date: 2012-08-28T16:49:12-05:00 List-Id: "Adam Beneschan" wrote in message news:289703e7-1fba-41ce-b781-9e58ff2ec7df@googlegroups.com... On Tuesday, August 28, 2012 1:13:02 AM UTC-7, Dmitry A. Kazakov wrote: > What are real problems with Ada syntax as opposed to the imaginary ones ... >> 2. "end record" instead of "end "; > >Yep, this is one I wish were different. After working with Ada for about >24 years > I still sometimes type in "end " before I catch myself. 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. ... >> 4. "overriding procedure Foo" instead of "procedure Foo is overriding"; > >It's possible for "overriding" to occur on a procedure body (and necessary >in some > less-common cases). I'd worry that if Foo has a long parameter list, an > overriding keyword >could get buried in a case like that, making it harder to spot for a >reader. That's a minor point, >though. I suspect that if we had added this in Ada 2012 rather than Ada 2005, it would have been an aspect -- using separate syntax is overkill for this problem. I.e. procedure Foo with Overriding; ... >With respect to *syntax* problems (as opposed to new features), my own wish >list would >include allowing a generic formal part to be repeated on a generic package >or procedure body. >(Otherwise, if the specification and body are in different source files, >you can't see the definitions >of the formal parameters when they're used in the body. I usually just >copy in the generic formal >part as comments.) As a user, I agree. As an implementer, I would look forward to implementing the 5 pages of conformance rules needed for that... :-( Randy.