From: Ralf Jung Date: Sat, 25 Aug 2018 14:59:09 +0000 (+0200) Subject: only must X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/9c7be02623a9185fb7c50084eb401c554d3f20fc?ds=sidebyside;hp=f0ea07bf1f64acbe93088bbdf5ebf7284c389855 only must --- diff --git a/personal/_posts/2018-08-22-two-kinds-of-invariants.md b/personal/_posts/2018-08-22-two-kinds-of-invariants.md index c54a010..34f33bb 100644 --- a/personal/_posts/2018-08-22-two-kinds-of-invariants.md +++ b/personal/_posts/2018-08-22-two-kinds-of-invariants.md @@ -185,7 +185,7 @@ My gut feeling is that it should not be (i.e., validity should require that `i32 I have talked about two kinds of invariants that come with every type, the safety invariant and the validity invariant. For unsafe code authors, the slogan summarizing this post is: -> *You must always be valid, but you must only be safe in safe code.* +> *You must always be valid, but you only must be safe in safe code.* I think we have enough experience writing unsafe code at this point that we can reasonably discuss which validity invariants make sense and which do not -- and I think that it is high time that we do so, because many unsafe code authors are wondering about these exact things all the time.