From: Nick Gordon <nicholas.gordon@operamail.com>
Subject: Re: How many of you have Ada programming careers?
Date: Wed, 11 Nov 2015 20:46:48 GMT
Date: 2015-11-11T20:46:48+00:00 [thread overview]
Message-ID: <YON0y.49417$xP1.35669@fx16.ams1> (raw)
In-Reply-To: 1ctu3b14cq1tt3q44om3nmfcmh08e3aed0@4ax.com
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
> Since many of us have been trained to "pretty-print" (ie; use
> indentation to indicate block structure), requiring {} begin/end etc. are
> superfluous to the design of the code. {} are difficult to see -- and
> difficult to match up in some coding styles -- personally the convention of
>
> if (cond) {
> <statements>
> } else {
> <statements>
> }
>
> is completely confusing... If delimiters are needed, I want them to align
> on the same column so I can use a straight-edge to find the blocks...
>
> if (cond)
> {
> <statements>
> }
> else
> {
> <statements>
> }
>
> Those languages using {} are even more problematic as the {} are
> typically NOT required if <statements> is only a single statement, not a
> block... That leads to things like
>
> if (cond)
> <statement>
> else
> {
> <statements>
> }
>
> At least Ada uses self blocking keywords, not line-noise, and the keywords
> are not optional.
>
You know before now I've exclusively written it in the:
if () {
} else }
}
style, because I felt that made more readable code chunks, but your explanation
of why:
if ()
{
}
else
{
}
is better suddenly makes a *lot* more sense. I think we can both agree though
that people that do this:
if () { }
else { }
are terrible humans.
Nick
next prev parent reply other threads:[~2015-11-11 20:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-07 3:39 How many of you have Ada programming careers? Nick Gordon
2015-11-07 4:41 ` Leo Brewin
2015-11-07 7:24 ` Jeffrey R. Carter
2015-11-08 2:44 ` Nick Gordon
2015-11-08 6:39 ` Nasser M. Abbasi
2015-11-08 16:31 ` Dennis Lee Bieber
2015-11-11 20:46 ` Nick Gordon [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-06 7:46 Nick Gordon
2015-11-06 8:25 ` Dmitry A. Kazakov
2015-11-06 8:29 ` J-P. Rosen
2015-11-06 12:02 ` Aurele
2015-11-06 15:52 ` Niklas Holsti
2015-11-06 18:04 ` AdaMagica
2015-11-06 18:08 ` Jeffrey R. Carter
2015-11-06 19:22 ` Hadrien Grasland
2015-11-06 20:57 ` mockturtle
2015-11-06 23:10 ` Paul Rubin
2015-11-07 2:11 ` Jerry Petrey
2015-11-07 3:31 ` R. B. Love
2015-11-07 7:43 ` Per Sandberg
2015-11-07 7:51 ` Per Sandberg
2015-11-07 8:07 ` Charles H. Sampson
2015-11-07 8:59 ` gautier_niouzes
2015-11-11 11:13 ` gautier_niouzes
2015-11-07 9:38 ` Martin
2015-11-07 9:38 ` Chris Moore
2015-11-07 12:19 ` Simon Wright
2015-11-07 14:26 ` Björn Lundin
2015-11-07 16:54 ` Dennis Lee Bieber
2015-11-09 2:32 ` tmoran
2015-11-09 8:59 ` Jacob Sparre Andersen
2015-11-10 19:58 ` Lucretia
2015-11-10 21:07 ` Luke A. Guest
2015-11-10 21:31 ` Luke A. Guest
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox