3 ms·
As you say, it's off by default in ReleaseFast, which sounds like what most projects would use for shipping code, and what most users would be running. So the s
by int_19h 8y ago
As you say, it's off by default in ReleaseFast, which sounds like what most projects would use for shipping code, and what most users would be running. So the safety checks would mostly be confined to debug builds - and from experience with C++, that's not enough. Especially for integer overflow, where it's too easy to write code that works correctly on most inputs, but fails for large values - so those bugs usually manifest in real world use rather than in testing.
I agree that it's better to panic rather than wrap around by default, so long as panic is guaranteed.