
On 2013-07-23 21:37, i c wrote:
let's consider the following:
let fd = Unix.open ... let fd = Unix.open ...
At this point one file descriptor cannot be closed. Static analysis will have trouble catching these bugs, so do humans. Disallowing variable shadowing prevents this. The two "fd" occur in different contexts and should have different names.
I think you've misunderstood my "challenge". I'm not talking about examples of either good or bad, but empirical *evidence* for sample sizes greater than 1. As in: If there was an article title "Is shadowing easier to understand than explicitly named intermediate variables?" with an empirically supported conclusion, I think everybody would be happy, but I just don't think we're quite there... Regards,