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,2a687662f09731bb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller.gnilink.net!gnilink.net!trnddc01.POSTED!20ae255c!not-for-mail Newsgroups: comp.lang.ada From: Anonymous Coward Subject: Ada Quality and Style book discussion References: Message-Id: User-Agent: slrn/0.9.7.4 (Linux) Date: Wed, 16 Nov 2005 03:10:19 GMT NNTP-Posting-Host: 141.149.78.234 X-Complaints-To: abuse@verizon.net X-Trace: trnddc01 1132110619 141.149.78.234 (Tue, 15 Nov 2005 22:10:19 EST) NNTP-Posting-Date: Tue, 15 Nov 2005 22:10:19 EST Xref: g2news1.google.com comp.lang.ada:6414 Date: 2005-11-16T03:10:19+00:00 List-Id: In article , tmoran@acm.org wrote: >> I'm interested in style and what do you consider to be a *good* Ada > There is a wonderful book "Ada Quality and Style, Guidelines for > Professional Programmers". A search at www.adaic.org finds the > Ada 95 version online. Thanks for the recommendation. I briefly skimmed through part of it. I agree with most of it, but I do have some issues. This was taken from 3.2.2: type Day is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); type Day_Of_Month is range 0 .. 31; type Month_Number is range 1 .. 12; type Historical_Year is range -6_000 .. 2_500; type Date is record Day : Day_Of_Month; Month : Month_Number; Year : Historical_Year; end record; In particular, Day should be used in preference to Days or Day_Type. I would not crunch all those type definitions together, especially when some of them are multi-line definitions. They should have a line between them. I also object to the guides comment advising against "Day_Type". It's a very good practice to suffix types with "_Type", "_Record", or "_Array", so it's clear from the identifier what it refers to, and also so you don't hijack a good variable name. In the above case, "Day" can no longer be used to name an object. I'm surprized that section 2.1.5 permits: procedure Display_Menu_On_Screen ( Title : in String; Options : in Menus; Choice : out Alpha_Numerics ); The last line needlessly kills a line, and I always thought ending a line with an open grouping symbol (like "(") is pretty ugly.