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,FREEMAIL_FROM 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!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!posting5.xlned.com!feeder.cambriumusenet.nl!feed.tweaknews.nl!posting.tweaknews.nl!fx16.ams1.POSTED!not-for-mail From: Nick Gordon Subject: Re: How many of you have Ada programming careers? Newsgroups: comp.lang.ada References: <6oe%x.2659$tP1.2654@fx23.ams1> <1ctu3b14cq1tt3q44om3nmfcmh08e3aed0@4ax.com> User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.16.0-4-amd64 (x86_64)) Message-ID: X-Complaints-To: abuse@tweaknews.nl NNTP-Posting-Date: Wed, 11 Nov 2015 20:46:48 UTC Organization: Tweaknews Date: Wed, 11 Nov 2015 20:46:48 GMT X-Received-Bytes: 2183 X-Received-Body-CRC: 2272598256 Xref: news.eternal-september.org comp.lang.ada:28313 Date: 2015-11-11T20:46:48+00:00 List-Id: Dennis Lee Bieber 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) { > > } 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. > 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