<div dir="ltr"><div><div><div><div><div>let&#39;s consider the following:<br><br></div>let fd = Unix.open ...<br></div>let fd = Unix.open ...<br><br></div>At this point one file descriptor cannot be closed. Static analysis will have trouble catching these bugs, so do humans.<br>
</div>Disallowing variable shadowing prevents this.<br></div>The two &quot;fd&quot; occur in different contexts and should have different names.<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 23, 2013 at 8:17 PM, Bardur Arantsson <span dir="ltr">&lt;<a href="mailto:spam@scientician.net" target="_blank">spam@scientician.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2013-07-22 17:09, i c wrote:<br>
&gt; Usage of shadowing is generally bad practice. It is error-prone. Hides<br>
&gt; obnoxious bugs like file descriptors leaks.<br>
<br>
</div>These claims need to be substantiated, I think.<br>
<br>
(Not that I disagree, I just think that asserting this without evidence<br>
isn&#39;t going to convince anyone who is of the opposite mindset.)<br>
<br>
Regards,<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>