comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: How many of you have Ada programming careers?
Date: Sun, 08 Nov 2015 11:31:41 -0500
Date: 2015-11-08T11:31:41-05:00	[thread overview]
Message-ID: <1ctu3b14cq1tt3q44om3nmfcmh08e3aed0@4ax.com> (raw)
In-Reply-To: n1mqnf$eah$1@speranza.aioe.org

On Sun, 8 Nov 2015 00:39:43 -0600, "Nasser M. Abbasi" <nma@12000.org>
declaimed the following:

>
>When using Python, there are lots of self.x and self.y
>and self.* all over the code. This makes the code

	And fully realized C++ tends to use this.*, Visual Basic uses me.*, Ada
doesn't have a "standard" (neither does Python -- "self" is convention,
whereas C++ and VB etc. need it as a keyword as they don't explicitly pass
the object in the parameter list).

	Those are declarative languages where all the attributes have been
pre-defined in the class definition -- one could think the compiler could
figure out what scope applies to a variable reference. Python is fully
dynamic, it must be told when something is a "stack" local (not that the
implementation has to use a stack) that goes away after the method exits,
vs an instance attribute that needs to hang around between invocations, vs
a class-wide attribute...

>very ugly to read, since class own variables must be
>references using self., I also found not have a closing
>ENDIF and END LOOP, etc.. even if it was just "}" marker,
>very confusing and made the code and the algorithms
>actually harder to read for me. I kept looking for
>a closing "}" and not finding it.
>
	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.

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


  reply	other threads:[~2015-11-08 16:31 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 [this message]
2015-11-11 20:46         ` Nick Gordon
  -- 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