Is there a reason the regular ‘=‘ assignment operator doesn’t return the value assigned?,(reply>), @Vendicar Kahn <br>To drive the point home:<br>Python uses prefix notation for "global" (module scope) functions:<br>    add(a,b)<br>And infix notation for class methods:<br>    a.add(b)<br>The definition is the same in either case, only the scope is different.<br><br>The quirky syntax was adopted from C++, which inherited it from C.,(reply>), @Vendicar Kahn <br><i>&gt; You can claim that A + B is actually a call to function +(A,B)  but then you can claim with equal correctness that func(A,B) is really A func B;</i><br>Yes, it is.  The only difference is syntax.<br><br>In APL it would be written in the latter way.<br>In Haskell you would have to put "func" in backticks.,(reply>), @Vendicar Kahn <br><i>&gt; Actually the number of functions called is arbitrarily large since the number of nested compositions is arbitrarily large.</i><br>If you chain them, yes.<br><br><i>&gt; You don't seem to have a point.</i><br>The point is:  It is not one.<br>And you seem to have gotten it.￼<br>And that point was instrumental to the point that if two functions are called, neither is necessarily a hidden side effect, as you claimed.<br>I don't know if you have gotten that.￼<br><br><i>&gt; "+" is an operator, not a function.</i><br>There is no fundamental difference.<br>That is basic knowledge.<br>Most tutorials mention that, even.<br><br>Only <i>some</i> languages make a syntactic difference.<br><br>How do you not know that?￼<br>￼<br>VK <i>&gt;&gt;&gt; Infix notation is used to define operators</i><br>DW <i>&gt;&gt; Operators are also functions.</i><br>DW <i>&gt;&gt; The syntax depends solely on the language.</i><br>VK <i>&gt; "Infix notation is used to define operators" -@David Wührer</i><br>VK <i>&gt; You don't seem to have a point.</i><br>You seem to have accidentally￼ retorted to yourself.<br>Also, you have attributed to me by mistake something that you yourself said.,(reply>), @Vendicar Kahn <br><i>&gt;&gt; Do you know what function composition is?</i><br><i>&gt; Yes. It is a childishly trivial concept.</i><br>Then you should already know that two functions get called in it.  (Three, if the function composition itself is a function.)<br>And not one, as you claimed.<br><br><i>&gt;&gt; The one is prefix notation, the other is infix notation</i><br><i>&gt; No. One is function notation and the other is infix notation.</i><br>Both are function notations.<br><br><i>&gt; Infix notation is used to define operators, and function notation, functions.</i><br>Operators are also functions.<br>The syntax depends solely on the language.<br><br><i>&gt; In this instance infix notation would be</i><br><i>&gt;:= a b</i><br>That's prefix notation, not infix notation.<br>Infix means that the operator (or function name, same thing) is in between the parameters.  APL for example uses exclusively infix notation.  LISP uses exclusively prefix notation.  In Haskell, any function can be both declared and used with either notation.<br>C++ is a special case.<br><br><i>&gt;&gt; Your prefix notation is unfortunate, however, because the return value is syntactically indistinguishable from an input value.</i><br><i>&gt; Unless the value is a function of the input</i><br>Even so.  A function whose value does not depend on input is a constant function.  (The input may be from an implicit side effect, such as RNG or I/O, and not part of the parameter list.)<br>Assuming, if I may, that the function maps a value 𝑏 to a value 𝑎̱, then it would be more readable if there was a clear distinction between the list of input parameters and the list of output parameters.<br><br><i>&gt; A := B</i><br><br><i>&gt; The operator in this example is returning a value to A, and also returning a value to a hidden internal variable that is either dumped or used by another operator.</i><br><br>I don't know if you know this, but there is a definitive difference between a side effect and a variable.<br><br>What internal variables a function uses is completely irrelevant to its signature.<br><br>This function here which you declared to be an assignment earlier returns exactly one value, and that is the value A.<br><br>Of course the function could also return a tuple value, one element being the value of the assignment, the other the value of equality.  But then still neither value would be a side effect, nor even hidden.<br><br><i>&gt; In a compiled language, this would translate to A = &amp;N</i><br><i>&gt;                     B = &amp;N+M</i><br><i>&gt;                     MOV REGx,B</i><br><i>&gt;                     MOV A.REGx</i><br><i>&gt;                     CMP A,C</i><br><br>That is not valid assembler code in any CPU I know.<br><br>Stick to Python.,(reply>), @Vendicar Kahn <br><i>&gt;&gt; Take function composition for example.  When applied to pure functions, there is no side effect whatsoever.</i><br><i>&gt; Why should there be?  Only one function is being called.</i><br>Do you know what function composition is?<br><br><i>&gt;&gt; It explicitly returns a value.  That's what functions do.</i><br><i>&gt; Then write it as a function :=(a,b)</i><br><i>&gt; Don't write it as an operator a := b</i><br>The one is prefix notation, the other is infix notation.  The function stays the same in either case.<br>Your prefix notation is unfortunate, however, because the return value is syntactically indistinguishable from an input value.  Have you worked in Pascal or any other of Wirth's languages before?<br><br><i>&gt; The operator := is returning two values</i><br>No, it isn't.<br><i>&gt;&gt; Where?</i><br><br><i>&gt; You have just proven my point.</i><br>You have no point.