<div dir="ltr"><div class="gmail_quote"><div dir="ltr">[Alexander Belopolsky]<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Do we want to protect users who<br>
> cannot tell = from == so much that  we are willing to cause Python to be<br>
> the first language with two non-interchangeable assignment operators?<br></blockquote><div><br>

<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[Steven D'Aprano][</span><br style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Not even close to the first. Go beat us to it -- it has both = and := <br>
assignment operators.<br>
<br>
Ocaml also has := for regular assignment and <- for assignment to <br>
mutable fields.<br>
<br>
Similarly, Haskall has = for assignment definitions and <- for binding <br>
in monads.<br></blockquote><div><br>I skipped that part, because nobody actually cares ;-)<br><br>But back when I looked at this, R had them all beat, and I never found a single source that actually managed to list _all_ of R's variations  This source was clearest, but is missing (at least) all the ways to spell all the variations as function calls too:<br><br>    <a href="https://stat.ethz.ch/R-manual/R-devel/library/base/html/assignOps.html">https://stat.ethz.ch/R-manual/R-devel/library/base/html/assignOps.html</a><br><br>

<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">There are three different assignment operators: two of them have leftwards and rightwards forms.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">The operators<span> </span><code><-</code><span> </span>and<span> </span><code>=</code><span> </span>assign into the environment in which they are evaluated. The operator<span> </span><code><-</code><span> </span>can be used anywhere, whereas the operator<span> </span><code>=</code><span> </span>is only allowed at the top level (e.g., in the complete expression typed at the command prompt) or as one of the subexpressions in a braced list of expressions.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">The operators<span> </span><code><<-</code><span> </span>and<span> </span><code>->></code><span> </span>are normally only used in functions, and cause a<span>  ...<br></span>.[click the link if you're still awake]<br></blockquote><div> </div>

</div></div></div>