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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 08 Nov 2015 10:31:42 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: How many of you have Ada programming careers? Date: Sun, 08 Nov 2015 11:31:41 -0500 Organization: IISS Elusive Unicorn Message-ID: <1ctu3b14cq1tt3q44om3nmfcmh08e3aed0@4ax.com> References: <6oe%x.2659$tP1.2654@fx23.ams1> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.178.61 X-Trace: sv3-q60xiJCQWQ86Pw+qS51nT3oL0kQx43DbTlJVm5VejSkbFkDeSzE19YP17X/ji7stcDHd7r1d4ndJRKk!qS5pqkDfHnQGP0NyvGF28b/PB0IszSJ/MG/ruuGxnVZPJTM8ALihGaiNEZGa+bDxHt0bvpmS644E!sO6dsPKDE4QVi/k2lQfdERv4cgw= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3456 Xref: news.eternal-september.org comp.lang.ada:28277 Date: 2015-11-08T11:31:41-05:00 List-Id: On Sun, 8 Nov 2015 00:39:43 -0600, "Nasser M. Abbasi" 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) { } else { } 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) { } else { } Those languages using {} are even more problematic as the {} are typically NOT required if is only a single statement, not a block... That leads to things like if (cond) else { } 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/