10 ms·
I don't think I understand your point. You can use e.g. Nat in Idris to avoid the underflow possibility. A language shouldn't allow silent overflow, and to the
by lmm 10y ago
I don't think I understand your point.
You can use e.g. Nat in Idris to avoid the underflow possibility. A language shouldn't allow silent overflow, and to the extent that Rust encourages a style where you fiddle with overflowing integers this is a problem with Rust, though I don't believe Rust does encourage that style - it provides locks, and if you were writing a custom one for some reason you wouldn't naturally fiddle with an int, you'd use an affine type or some such.