<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">So I am a little confused.  Reading the EEP,</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">f(X, Y) -></span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">    case X of</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">        {a, Y} -> ok;</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">        _ -> error</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">    end.</span></div></blockquote><div class=""><br class=""></div><div class="">means the same as</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">f(X, Y) -></span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">    case X of</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">        {a, ^Y} -> ok;</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">        _ -> error</span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Monaco;" class="">    end.</span></div></blockquote><div class=""><br class=""></div><div class="">So it adds nothing semantically to the language.</div><div class=""><br class=""></div><div class="">The more compelling example is binding a clause head in a local function definition to a previously bound variable.  From the EEP:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Monaco" class=""><span style="font-style: normal;" class="">f(X, Y) -></span></font></div></div><div class=""><div class=""><font face="Monaco" class=""><span style="font-style: normal;" class="">    F = fun ({a, ^Y})  -> {ok, Y};</span></font></div></div><div class=""><div class=""><font face="Monaco" class=""><span style="font-style: normal;" class="">            (_) -> error</span></font></div></div><div class=""><div class=""><font face="Monaco" class=""><span style="font-style: normal;" class="">        end,</span></font></div></div><div class=""><div class=""><font face="Monaco" class=""><span style="font-style: normal;" class="">    F(X).</span></font></div></div></blockquote><div class=""><br class=""></div><div class="">But as noted later in the EEP, this can be written as</div><div class=""><br class=""></div><div class=""><blockquote style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><div class=""><font face="Monaco" class="">f(X, Y) -></font></div><div class=""><font face="Monaco" class="">    F = fun ({a, Z}) when Z =:= Y  -> {ok, Y};</font></div><div class=""><font face="Monaco" class="">            (_) -> error</font></div><div class=""><font face="Monaco" class="">        end,</font></div><div class=""><font face="Monaco" class="">    F(X).</font></div></blockquote></div><div class=""><br class=""></div><div class="">So as far as I can see, the proposal is at best proposing syntactic sugar over what can already be accomplished in the language.  Current Erlang might be more verbose (by character count), but to say it is more or less clear is in the eye of the beholder, certainly.</div><div class=""><br class=""></div><div class="">I think the real question is whether the language should admit two ways of accomplishing the same thing (and by that, I mean compiling to effectively the same BEAM ASM), and that is really up to the language maintainers.</div><div class=""><br class=""></div><div class="">If you want my personal opinion (I know, you didn't ask), I lean on the side of "Less is more", when it comes to language features.  Having to read Scala in my day job, I can't think of a programming language that more violates the principle of linguistic parsimony -- it even puts C++ to the test!</div><div class=""><br class=""></div><div class="">And not to be too critical, but I am having a hard time understanding parts of the Rationale section.  The author(s) suggest(s) that in current Erlang temporary variables are needed to achieve the same as the proposed glyph, but then provide an example that uses a guard (as above) but doesn't use a temporary variable, after all (?)</div><div class=""><br class=""></div><div class="">I am not sure what the problem is with temporary variables.  The compiler has registers at its disposal, so I don't think it's a performance argument, but more an issue of readability, which again, I think is a purely aesthetic question, and has no bearing on the features of the language, per se.  In other words, the proposal is not suggesting anything that cannot already be achieved in current Erlang, <i class="">with effectively the same compiled BEAM ASM.</i></div><div class=""><br class=""></div><div class=""><br class=""></div>Also, kind of a stupid question, but wouldn't<div class=""><br class=""></div><div class=""><font face="Monaco" class=""><span style="font-style: normal;" class="">f(X, Y) -><br class="">    case X of<br class="">        {a, Y} -> ok;<br class="">        _ -> error<br class="">    end.</span></font></div><div class=""><br class=""><div class=""><div class="">be more clearly written:</div><div class=""><br class=""></div><span style="font-style: normal;" class=""><font face="Monaco" class="">f({a, Y}, Y) -> ok;<br class="">f(_, _) -> error.</font></span></div><div class=""><span class=""><br class=""></span><div>I would never write the former, if I had the option to write the latter, but that just may be my personal preference.</div><div><br class=""></div><div>-Fred</div><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 21, 2022, at 8:32 AM, Leonard Boyce <<a href="mailto:leonard.boyce@lucidlayer.com" class="">leonard.boyce@lucidlayer.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><blockquote type="cite" class=""><br class="">EEP-0055 (<a href="https://github.com/erlang/eep/blob/master/eeps/eep-0055.md" class="">https://github.com/erlang/eep/blob/master/eeps/eep-0055.md</a>) was submitted on<br class="">21-Dec-2020.<br class=""></blockquote></div></div></blockquote></div><br class=""></div></div></body></html>