<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="gmail_default" style="font-family:monospace,monospace">On
12/27/20 3:39 PM, Richard O'Keefe wrote:</div>
<blockquote type="cite"
cite="mid:CABcYAdLwzn6qA09Fde+CVcN5QuCBBq2xFBLhU8BQLOWObur+2w@mail.gmail.com">
<div dir="ltr">
<div class="gmail_default"
style="font-family:monospace,monospace"><br>
</div>
<div class="gmail_default"
style="font-family:monospace,monospace">One thing I *would*
like is an analogue of -Werror.</div>
</div>
</blockquote>
We have the option warnings_as_errors, so we have that now (added in
R13B04).<br>
<br>
Best Regards,<br>
Michael<br>
<br>
<br>
<blockquote type="cite"
cite="mid:CABcYAdLwzn6qA09Fde+CVcN5QuCBBq2xFBLhU8BQLOWObur+2w@mail.gmail.com">
<div dir="ltr">
<div class="gmail_default"
style="font-family:monospace,monospace"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, 27 Dec 2020 at 02:16,
Anthony Ramine <<a href="mailto:n.oxyde@gmail.com"
moz-do-not-send="true">n.oxyde@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">That's
already a thing in Erlang and AFAIK that never caused issues
for anyone.<br>
<br>
X = 2.<br>
F = fun (<<_:X/binary>>, X) -> oh end.<br>
F(<<0, 0>>, 3).<br>
<br>
> Le 25 déc. 2020 à 23:41, Richard O'Keefe <<a
href="mailto:raoknz@gmail.com" target="_blank"
moz-do-not-send="true">raoknz@gmail.com</a>> a écrit :<br>
> <br>
> "This fills a much-needed gap."<br>
> <br>
> Erlang functions are as a rule small enough that you<br>
> shouldn't ever shadow a variable. One of the worst<br>
> features of Erlang is that you can write<br>
> foo(X) -> fun (X) -> fun (X) -> 1 end end.<br>
> and have three different variables all called X, and<br>
> one of the good things about erlc is that it tells you.<br>
> foo.erl:3: Warning: variable 'X' is unused<br>
> foo.erl:3: Warning: variable 'X' is unused<br>
> foo.erl:3: Warning: variable 'X' shadowed in 'fun'<br>
> foo.erl:3: Warning: variable 'X' shadowed in 'fun'<br>
> <br>
> The very last thing we want is a notation that lets<br>
> us have two different variables with the same name<br>
> in a single pattern.<br>
> <br>
> <br>
> On Fri, 25 Dec 2020 at 09:10, Richard Carlsson <<a
href="mailto:carlsson.richard@gmail.com" target="_blank"
moz-do-not-send="true">carlsson.richard@gmail.com</a>>
wrote:<br>
> The ^ operator allows you to annotate already-bound
pattern variables as ^X, like in Elixir. This is less error
prone when code is being refactored and moved around so that
variables previously new in a pattern may become bound, or
vice versa, and makes it easier for the reader to see the
intent of the code.<br>
> <br>
> See also <a
href="https://github.com/erlang/otp/pull/2951"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/erlang/otp/pull/2951</a><br>
> <br>
> Ho ho ho,<br>
> <br>
> /Richard & the good folks at WhatsApp<br>
<br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
eeps mailing list
<a class="moz-txt-link-abbreviated" href="mailto:eeps@erlang.org">eeps@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/eeps">http://erlang.org/mailman/listinfo/eeps</a>
</pre>
</blockquote>
<br>
</body>
</html>