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!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: 'raise' in aspects? Date: Sun, 26 Oct 2014 00:16:43 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <85siilc88t.fsf@stephe-leake.org><85h9ywasfq.fsf@stephe-leake.org> NNTP-Posting-Host: 24-196-82-226.static.mdsn.wi.charter.com X-Trace: loke.gir.dk 1414300604 21550 24.196.82.226 (26 Oct 2014 05:16:44 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sun, 26 Oct 2014 05:16:44 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:22741 Date: 2014-10-26T00:16:43-05:00 List-Id: "Simon Wright" wrote in message news:lyy4s67x3m.fsf@pushface.org... > "Randy Brukardt" writes: > >> You can write >> raise Program_Error with "Not yet implemented"; >> in any function (since a raise expression matches any type), and you >> don't >> have to dream up a useless dummy return value to do so. > > actually > > return raise Program_Error with "Not yet implemented"; > > of course. Right. > I liked (but haven't had reason to try; I had already spent far too long > generating "useless dummy return values") Bob Duff's recursive solution: > > function F return Boolean is > begin > raise Program_Error with "Not yet implemented"; > return F; > end F; I think that one is a compiler-fall-over test, at least if the return type is a limited and required build-in-place. :-) Not so much for Boolean (but of course "return False" works fine there). Randy.