Secure Rust Guidelines
I personally strongly disagree with:Functions or instructions that can cause the code to panic at runtime must not be used.First of all, they kind of dodge this later by saying "Array indexing must be properly tested" (else it can panic) -- everyone thinks they write code which is "properly tested".Personally, I often write panicing code -- if the code gets in a state where I have no idea how to fix it, I panic. For some code it is important it does quit, but I'd much prefer more code paniced than tried to carry on and ended up creating other problems.Also, in rust if we don't want to panic we need to never use array indexing and never use integer division, just to start.Of course, it's fine to write code which plans to never panic, but I think it would be better to say "Have a formal 'panic plan'", where either one panics early, or tries to never panic.