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!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: Implementing Rust's borrow checked pointers Date: Tue, 24 Sep 2019 13:31:13 -0700 Organization: None to speak of Message-ID: References: <5edf39fb-169a-463a-b28e-ece1d3b553e0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="28292d79cbf11d7f5785c7d4405154cb"; logging-data="8699"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+LYYd25Liko5mBwc3FbK31" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:7bJM9rN0d7Cmnepr6l3IyfajAIk= sha1:5iXAULBLTRdWqOa5PUfxhL4/GgU= Xref: reader01.eternal-september.org comp.lang.ada:57187 Date: 2019-09-24T13:31:13-07:00 List-Id: Optikos writes: > On Tuesday, September 24, 2019 at 2:13:33 PM UTC-5, Keith Thompson wrote: >> Lucretia writes: [...] >> > Yes, the compiler would raise that exception at compile time. This >> > idea that all exceptions are raised at runtime is false and you should >> > check the AARM. >> >> Can you provide a specific citation? >> >> Certainly a compiler can diagnose an error at compile time, but I've >> never heard that referred to as an "exception". And a compiler can >> generate code that unconditionally raises an exception, but that code is >> executed at run time. >> >> (I've seen compile-time exceptions, but they were compiler bugs, not >> diagnostics for the program being compiled.) > > Keith, I already did in a prior posting above, but you apparently > blocked me, so your loss. I have not blocked you. It's entirely possible that I missed your earlier article (I don't follow this newsgroup all that closely), or that I read it but didn't think it supported the assertion. > Here is the answer to your question again > for all other readers: §1.1.5 Classification of •Errors “If such an > •error• situation is certain to arise in every execution of a > construct, then an implementation is •••allowed (although not > required)••• to report this fact at •compilation• time.” That doesn't describe raising an exception at compilation time. It describes (optionally) *reporting* at compilation time that an exception is certain to be raised at run time. Again, the claim (from Lucretia, not from you) was: Yes, the compiler would raise that exception at compile time. This idea that all exceptions are raised at runtime is false and you should check the AARM. Printing a warning message is not raising an exception. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */