<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div>Occurrences of bound variables in patterns. For example A, B, C, and D in these:</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">  {A, B} = f(X),</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">  {A, B} = f(Y),   % A,B already bound</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">  C = g(Z),</div><div
 style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">  C = g(W),        % C is already bound</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">  {D,D} = h(V)     % D is bound then matched</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Best,</div><div style="color: rgb(0, 0, 0);
 font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Thomas</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><br></div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Wednesday, March 5, 2014 3:39 PM, Anthony Ramine <n.oxyde@gmail.com> wrote:<br> </font> </div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div
 class="y_msg_container">What would you like to be warned about? I don’t get it.<br clear="none"><br clear="none">-- <br clear="none">Anthony Ramine<br clear="none"><div class="yqt3426033215" id="yqtfd30036"><br clear="none">Le 5 mars 2014 à 15:33, Thomas Lindgren <<a shape="rect" ymailto="mailto:thomasl_erlang@yahoo.com" href="mailto:thomasl_erlang@yahoo.com">thomasl_erlang@yahoo.com</a>> a écrit :<br clear="none"><br clear="none">> Thanks Anthony, that option warns for Value in the previous example because it's exported from the case, but not for the variable match that then occurs. I'd like to see a compiler option that warned about matching (bound variables occurring in patterns), which would catch other inadvertent reuse of variable names.<br clear="none">> <br clear="none">> Best,<br clear="none">> Thomas<br clear="none">> <br clear="none">> <br clear="none">> On Wednesday, March 5, 2014 2:40 PM, Anthony Ramine <<a
 shape="rect" ymailto="mailto:n.oxyde@gmail.com" href="mailto:n.oxyde@gmail.com">n.oxyde@gmail.com</a>> wrote:<br clear="none">> The compile option is warn_export_vars:<br clear="none">> <br clear="none">>     Causes warnings to be emitted for all implicitly exported variables referred to after the primitives where they were first defined. No warnings for exported variables unless they are referred to in some pattern, which is the default, can be selected by the option nowarn_export_vars.<br clear="none">> <br clear="none">> -- <br clear="none">> Anthony Ramine<br clear="none">> <br clear="none">> Le 5 mars 2014 à 12:18, Thomas Lindgren <<a shape="rect" ymailto="mailto:thomasl_erlang@yahoo.com" href="mailto:thomasl_erlang@yahoo.com">thomasl_erlang@yahoo.com</a>> a écrit :<br clear="none">> <br clear="none">> > In the larger scheme of things: The way I see it, the feature of implicit variable matching
 is more trouble than it's worth. Warnings about such matches would catch this kind of problems.<br clear="none">> > <br clear="none">> <br clear="none">> <br clear="none"></div><br><br></div> </blockquote>  </div> </div>   </div> </div></body></html>