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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: emery@grebyn.com (David Emery) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/03 Message-ID: #1/1 X-Deja-AN: 145536594 references: <3160E91E.1627@lfwc.lockheed.com> <316120DC.1F93@lfwc.lockheed.com> organization: MIND LINK! - British Columbia, Canada newsgroups: comp.lang.ada Date: 1996-04-03T00:00:00+00:00 List-Id: On the topic of 'named things', one area where Ada could have improved, in my opinion, is to allow an optional name at the end of a record declaration. I've seen some code with a lot of relatively complex record declarations, where this would have helped readability. As a coding convention, I usually provide the comment after "end record" when the record declaration is "long" (greater than 10 lines, depending on context). Here's what I would have liked: type Very_Complex_record (Discr1, Discr2 : integer; Has_Blotz : boolean) is record f1 : t1; f2 : t2; case has_blotz is when true => case Discr1 is when 3 | 6 | 9 => Mungification : Whatever; when 42 => Life_The_Universe_and_Everything : Boolean := False; when others => case Disrc2 is when 69 => null; -- what did you expect?? when 100 => George_Burnes_Cigars : Stogies; when others => Shoe_Size : natural; end case; end case; when false => Other_Stuff : Some_Other_Record (Sex => true); end case; end record Very_Complex_Record; -- not legal Ada, at not least in -- this millennium... dave