3 ms·
Glad you got a good think. One thing worth pointing out, is that I did try to head off an experience like what you had by stating my position up front. In the
by burntsushi 4y ago
Glad you got a good think.
One thing worth pointing out, is that I did try to head off an experience like what you had by stating my position up front. In the first section after the ToC, the third bullet point reads:
> If a Rust program panics, then it signals a bug in the program. That is, correct Rust programs don’t panic.
I suspect you might have just accidentally skipped over that. Because I think it re-affirms that you should indeed not panic arbitrarily.
As for runtime invariants, I have them a lot in Rust. I tend to work on lower level text primitives (regex engines) where perf is quite important. Perf tends to add complexity in the form of an increased number of runtime invariants. I do my best to push them to compile time where I can, but it just isn't always possible.