I think that walrus operator should be added to C or C++. I think it translates to more efficient machine code, unless the compiler is able to do the same.,(reply>), ​@floyd nelson Yep, the c/c++ assignment operators already work like the walrus operator in python. This can be a big pain point, because you can accidentally do the following:<br><br>int x = foo();<br>int y = bar();<br>if (x = y)<br>    //...<br><br>And it will compile, and do things you wouldn't expect.<br><br>As far as optimization is concerned, modern c/c++ compilers convert your code into ssa form and then perform optimizations on that, eventually producing machine code. They don't perform a direct translation of your source code into machine code. Both of your examples will produce equivalent ssa code," which (ideally) causes them to produce equivalent machine code. You can see this in action here: <a href=""https://godbolt.org/z/s9fMnq"">https://godbolt.org/z/s9fMnq</a>",(reply>), @odomobo He said the walrus operater does not just assign a value but returns that value when in an expression. <br>So, for an example like:<br>A = B / ((C := D + E) / F)<br>vs<br>C = D + E<br>A = B / (C / F)<br>If the C value is left in the CPU register after assigning to memory (which is guaranteed using the walrus operator), then the CPU doesn't have to recall C from memory in the next expression.,(reply>), Assignment in c and c++ is already an expression. What do you mean by "more efficient machine code"?