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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA 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.181.11.234 with SMTP id el10mr2323131wid.2.1346150824298; Tue, 28 Aug 2012 03:47:04 -0700 (PDT) Path: q11ni347274145wiw.1!nntp.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Real syntax problems in Ada Date: Tue, 28 Aug 2012 13:47:02 +0300 Organization: Tidorum Ltd Message-ID: References: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> Mime-Version: 1.0 X-Trace: individual.net krwErtro9ijfNDoBT6zZXwmmTkrhS/9tUiv5/js9dokUSIJDtndJ+5APodcs85SRei Cancel-Lock: sha1:hSvr56nnWKwK7wgwGNMHFDbFKL4= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-08-28T13:47:02+03:00 List-Id: On 12-08-28 11:13 , Dmitry A. Kazakov wrote: > What are real problems with Ada syntax as opposed to the imaginary ones > (e.g. Ada does not look like C, Forth, Elder Futhark, you name it)? > > My short list: And my opinions/votes: > 1. Too many unnecessarily reserved keywords; At least the reserved words tend to be short, and therefore not so suitable for identifiers. I believe that reserved words make it easier for compilers to give good error messages. > 2. "end record" instead of "end "; I agree. The second form should be allowed. > 3. "task type" and "protected type" instead of "type T is task ..."; Neutral. I don't much mind the asymmetry, although I don't see any good reason for it. > 4. "overriding procedure Foo" instead of "procedure Foo is overriding"; I prefer the current form, with overriding at the start. "Overriding" is not a property of "Foo" itself, but of the declaration. > 5. "X : T := E", but "procedure X is "; I like the present form. The "procedure" and "function" keywords in the left margin make the source code more readable. The role of subprograms in a program is so different from the role of variables (objects) that a different declaration style is motivated. > 6. Lack of per point notation for nD array aggregates, e.g. > Diag : Matrix := ((1,1)=>1.0, (2,2)=>1.0, (3,3)=>1.0, others => 0.0); Could be useful on occasion. Would be nice to have. > 7. "exception" must be required in the bodies of tasks, Initialize, > Finalize (however, this could be resolved by non-syntactic means, e.g. by > contracted exceptions); Not really a question of syntax. Best handled by a legality rule. > 8. The order in which the keywords "new", "interface", "limited", > "abstract", "tagged", "private" may appear should be free. Ok, why not. But the present strictness is at most a minor nuisance. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .