From: emery@grebyn.com (David Emery)
Subject: Re: some questions re. Ada/GNAT from a C++/GCC user
Date: 1996/04/03
Date: 1996-04-03T00:00:00+00:00 [thread overview]
Message-ID: <emery-0204961948020001@line161.nwm.mindlink.net> (raw)
In-Reply-To: Dp93wB.EEG@world.std.com
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
next prev parent reply other threads:[~1996-04-03 0:00 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-03-27 0:00 some questions re. Ada/GNAT from a C++/GCC user Bill Newman
1996-03-27 0:00 ` Robert Dewar
1996-03-28 0:00 ` Brian Rogoff
1996-03-29 0:00 ` John G. Volan
1996-03-30 0:00 ` Robert A Duff
1996-03-31 0:00 ` John G. Volan
1996-03-31 0:00 ` Mike Young
1996-04-02 0:00 ` Glenn H. Porter
1996-04-02 0:00 ` Jonas Nygren
1996-04-02 0:00 ` Robert Dewar
1996-04-03 0:00 ` Geert Bosch
1996-04-03 0:00 ` Robert Dewar
1996-04-01 0:00 ` Bruce.Conroy
1996-04-01 0:00 ` Robert A Duff
1996-04-03 0:00 ` Scott Leschke
1996-04-04 0:00 ` AdaWorks
1996-03-31 0:00 ` Robert Dewar
1996-04-01 0:00 ` Norman H. Cohen
1996-03-30 0:00 ` Mike Young
1996-03-30 0:00 ` Ted Dennison
1996-03-31 0:00 ` Mike Young
1996-04-01 0:00 ` Norman H. Cohen
1996-04-01 0:00 ` Mike Young
1996-04-02 0:00 ` David Shochat
1996-04-02 0:00 ` Mike Young
1996-04-02 0:00 ` Norman H. Cohen
1996-04-02 0:00 ` Robert Dewar
1996-04-01 0:00 ` Robert A Duff
1996-04-01 0:00 ` Mike Young
1996-04-02 0:00 ` Norman H. Cohen
1996-04-02 0:00 ` Robert A Duff
1996-03-28 0:00 ` Norman H. Cohen
1996-03-28 0:00 ` Scott Leschke
1996-03-29 0:00 ` Bill Newman
1996-03-29 0:00 ` Robert I. Eachus
1996-03-29 0:00 ` Robert A Duff
1996-03-30 0:00 ` Richard Pitre
1996-03-30 0:00 ` Robert A Duff
1996-03-31 0:00 ` AdaWorks
1996-04-01 0:00 ` Robert A Duff
1996-04-01 0:00 ` AdaWorks
1996-04-01 0:00 ` Mike Young
1996-04-02 0:00 ` Robert Dewar
1996-04-02 0:00 ` AdaWorks
1996-04-01 0:00 ` Norman H. Cohen
1996-04-01 0:00 ` Ken Garlington
1996-04-01 0:00 ` Robert A Duff
1996-04-02 0:00 ` Ken Garlington
1996-04-02 0:00 ` Robert A Duff
1996-04-02 0:00 ` Ken Garlington
1996-04-02 0:00 ` Robert A Duff
1996-04-03 0:00 ` David Emery [this message]
1996-04-03 0:00 ` Ken Garlington
1996-04-09 0:00 ` Matt Kennel
1996-04-02 0:00 ` Tucker Taft
1996-04-02 0:00 ` Felaco
1996-04-02 0:00 ` Robert Dewar
1996-04-03 0:00 ` Mark A Biggar
1996-04-01 0:00 ` Robert Dewar
1996-04-01 0:00 ` Richard A. O'Keefe
1996-04-01 0:00 ` Robert A Duff
1996-04-02 0:00 ` Robert I. Eachus
1996-03-28 0:00 ` Ted Dennison
1996-03-29 0:00 ` Adam Beneschan
1996-03-29 0:00 ` Robert A Duff
1996-03-29 0:00 ` Brian Rogoff
1996-04-01 0:00 ` Mark A Biggar
1996-04-01 0:00 ` Robert A Duff
1996-03-30 0:00 ` Iterators (was Re: some questions re. Ada/GNAT from a C++/GCC user) Robert I. Eachus
1996-03-31 0:00 ` Mike Young
1996-03-31 0:00 ` Fergus Henderson
1996-04-01 0:00 ` Robert I. Eachus
[not found] ` <4jlj79$h1k@Nntp1.mcs.net>
1996-04-01 0:00 ` some questions re. Ada/GNAT from a C++/GCC user Robert A Duff
1996-04-02 0:00 ` Kevin Cline
1996-04-02 0:00 ` Robert A Duff
1996-04-04 0:00 ` Jon S Anthony
1996-03-30 0:00 ` Simon Wright
1996-04-01 0:00 ` Laurent Guerby
1996-04-01 0:00 ` Robert A Duff
-- strict thread matches above, loose matches on Subject: below --
1996-03-28 0:00 Simon Johnston
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox