From bceb52de08298f3180adaa14b6ea1a9fdeb2a5d8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 19 Jul 2018 22:37:57 +0200 Subject: [PATCH 1/1] clarify relation of CTFE correctness and const safety --- ralf/_posts/2018-07-19-const.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ralf/_posts/2018-07-19-const.md b/ralf/_posts/2018-07-19-const.md index 5907630..23e9325 100644 --- a/ralf/_posts/2018-07-19-const.md +++ b/ralf/_posts/2018-07-19-const.md @@ -138,7 +138,8 @@ So, we will likely have to live with either considering floating point operation I think it is possible to achieve CTFE correctness for all other operations, and I think we should strive to do so. Before we go on, notice that CTFE correctness as defined above does not say anything about the case where CTFE fails with an error, e.g. because of an unsupported operation. -That is a deliberate choice because it lets us gradually improve the operations supported by CTFE, but it is a choice that not everyone might agree with. +CTFE would be trivially correct (in the above sense) if it just always immediately returned an error. +However, since const-safe programs cannot error during CTFE, we know from CTFE correctness that *those* programs *do* in fact behave exactly the same at compile-time and at run-time. ## Unsafe Blocks in Const Context -- 2.30.2