<div dir="ltr"><div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>On Sun, Jan 20, 2019 at 6:43 PM James Lu <<a href="mailto:jamtlu@gmail.com">jamtlu@gmail.com</a>> wrote:<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Backtick expressions work exactly like lambdas, except that they are bound to the instance they are created in every time that class is used to create one. To illustrate, ...</blockquote><div> </div><div>First, if there is a useful procedure I am strongly against using backticks because (1) it's been used in the past with an entirely different meaning and (2) it looks ugly and is not visually suggestive at all of what it does, especially not the subtle difference between other function definitions. </div><div><br></div><div>Second, I don't understand exactly what this difference or why it would be useful. It would help for you to give examples comparing lambda and this variation.</div><div><br></div><div>Third, you mention using ^ in "explicit" expressions to refer to parameters of the "created function" and I do not know what function you are referring to or what the exact semantics of this are. Again, a comparison of two expressions with and without that ^ would help. An expression is not a function and not all expressions are written inside functions. (<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">And as to the specific proposed syntax, there already is the <font face="monospace, monospace">^</font> xor operator and the most expected meaning of<span> </span></span><font face="monospace, monospace" style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">^value</font><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>is<span> </span></span><font face="monospace, monospace" style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">~value</font><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">. just as the unary <font face="monospace, monospace">+</font> and <font face="monospace, monospace">-</font> operators corresponds to the binary operators.</span></div><div><br></div><div>The only thing that I can think of is that you want <font face="monospace, monospace">`foo + ^bar`</font> to be another way of writing <font face="monospace, monospace">lambda bar: foo + bar</font> with some 

<span style="font-family:arial,helvetica,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">under-specified </span>behavior for evaluating <font face="monospace, monospace">foo</font><font face="arial, helvetica, sans-serif"> and different under-specified behavior for evaluating </font><font face="monospace, monospace">bar</font><font face="arial, helvetica, sans-serif">.</font></div><div><br></div><div>Finally, if there is some other useful semantics for references inside a function definition, then I would think the best way to do that is to implement that, not add a new function difference. For example,</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div><font face="monospace, monospace">lambda foo: foo + $bar</font></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div><font face="monospace, monospace">def sample(foo):</font></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div><font face="monospace, monospace">    return foo + $foo</font></div></div></blockquote><div class="gmail_quote"><div><br></div><div>where I'm arbitrarily using $ to represent the new semantics whatever they are (no point in bikeshedding syntax when semantics are yet to be defined).</div><div><br></div><div>--- Bruce</div></div></div>