Secure Rust Guidelines
I personally strongly disagree with:<p>Functions or instructions that can cause the code to panic at runtime must not be used.<p>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".<p>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.<p>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.<p>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.