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.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Ada and "early return" - opinion/practice question Date: Mon, 15 Mar 2021 12:08:46 -0700 Organization: A noiseless patient Spider Message-ID: <87im5sutdt.fsf@nightsong.com> References: <38356aa9-b8b0-4e0b-a490-99e7b239d0b1n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="4b578c364627d4ab9243657a1b501040"; logging-data="19850"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MeTf9ZwUpY7rffZj0wWGq" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cancel-Lock: sha1:23jWbJandUbAgHkNEnw+OZZMphM= sha1:1oSN/6snz510eNIV+aOWyZnwKPk= Xref: reader02.eternal-september.org comp.lang.ada:61537 List-Id: Shark8 writes: > Exceptions, typically. Sometimes a return itself, typically in a > procedure though. This is interesting: I thought in the Java and C++ worlds, using exceptions to manage normal control flow was frowned on, in part because the exception mechanism is quite heavyweight. And in Haskell, exceptions are considered i/o effects and therefore nasty in pure code (code with side effects is "impure" and has a special type signature). Is there wisdom about this in Ada?