Re:Evergreen: A Provably Safe Systems Language
by jordan_bonecut on Wednesday November 04, 2026 @12:55PM
(#50369147)
Overflow is allowed. Overflow behavior is unspecified, like C++
Re:Evergreen: A Provably Safe Systems Language
by jordan_bonecut on Wednesday November 04, 2026 @12:57PM
(#50369177)
If you want to assume that overflow wraps either:
Your hardware does this OR You implement it in software
Your "overflow, then inspect" example illustrates this incoherency. If overflow is allowed, and you try to fit 250 + 10 into a u8, so the value should be 4, which is less than 10, so it should fit your precondition, not violate it. And this is a simple example where 250+10 is known at compile-time - what happens when a user provides the number at run-time? Does the compiler attempt to provide the proof anyway? How?
I mean.... I have a lot of respect for Haskell and Idris and the goals they set out. But they're not systems languages.