From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:9e56:: with SMTP id h83mr26966575qke.38.1615830201843; Mon, 15 Mar 2021 10:43:21 -0700 (PDT) X-Received: by 2002:a25:b790:: with SMTP id n16mr1181742ybh.309.1615830201629; Mon, 15 Mar 2021 10:43:21 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 15 Mar 2021 10:43:21 -0700 (PDT) In-Reply-To: <86eegge32o.fsf@stephe-leake.org> Injection-Info: google-groups.googlegroups.com; posting-host=80.229.20.55; posting-account=WsVe0AoAAABheGmBjlLgPWhgIw6kxcL6 NNTP-Posting-Host: 80.229.20.55 References: <38356aa9-b8b0-4e0b-a490-99e7b239d0b1n@googlegroups.com> <86eegge32o.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <077ed5ef-61c9-4178-a21c-e0955d5da12fn@googlegroups.com> Subject: Re: Ada and "early return" - opinion/practice question From: John McCabe Injection-Date: Mon, 15 Mar 2021 17:43:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61528 List-Id: On Monday, 15 March 2021 at 17:31:33 UTC, Stephen Leake wrote: > John McCabe writes:=20 >=20 > > I hope this isn't a FAQ (it's hard to find relevant articles) but can= =20 > > someone guide me on the 'normal' treatment in Ada style of what=20 > > appears to be referred to (by C/C++ programmers) as early-return.=20 <..snip..> > I would tend to use an exception for "something bad", but that depends=20 > on the overall design.=20 Fair enough. > There are various maintenance issues on both sides; the summary is=20 > "editing existing code is a pain" :(. Isn't is just; especially the C++ stuff when certain folk aren't quite sure= about when not to use templates! In recent months, where I've been learnin= g more and more about the ins and outs of "modern c++", I'm becoming more a= nd more inclined to ditch it and use something where the language designers= appear to want to address issues in a way that's consistent and relevant t= o their users' needs, rather than just fannying around to try to prove how = clever they are. > > Hope this is ok to ask! > Sure; there are times when one style is overwhelmingly better (ie=20 > requiring matching end names); this just isn't one of them.=20 Thanks.=20 As an aside, is there any way to use this group these days where text layou= t etc is honoured? Oh for the good old days of usenet! Cheers John