4 ms·
Right so really more of an expressivity issue: the compiler is not smart enough to remove all branches which can not happen in a given program, so some of those
by masklinn 5y ago
Right so really more of an expressivity issue: the compiler is not smart enough to remove all branches which can not happen in a given program, so some of those branches will be completely untestable despite being in the final object code e.g. have a vec![_;4], structurally use it such that the index can only be in-bounds, the compiler may not be able to elide the OOB checks because it might not understand they're unnecessary for real-world code.
- tptacek 5y agoFrankly, I think it's a pretty silly concern.
- cormacrelf 5y agoIt's substantially less silly than a small-time JavaScript component library adding 100% branch coverage testing requirements as a blocker to accepting a PR. But they do it for the same reason, to be able to advertise it and demonstrate reliability. This is how the sqlite project makes money. I guess someone's got to build the instrumentation tools that let them keep doing this, sounds like it won't be them. (Edit: not sure who else would have the motivation, to be honest. If they had to pioneer one thing, it should be that.)