Stewart Gordon wrote:
Yigal Chripun wrote:
<snip>
the only use case that will break is if the two increments are dependent on the order (unless tuples are also evaluated from left to right):
e.g.
a + 5, b + a //
<snip>

If you're overloading the + operator to have an externally visible side effect, you're probably obfuscating your code whether you use the comma operator or not.

Moreover, how can you prove that nothing that uses the operator's return value can constitute a use case?

Stewart.

I don't follow you. What I said was that if you have the above in a for loop with a comma expression, you'd expect to *first* add 5 to a and *then* add the new a to b (comma operator defines left to right order of evaluation). tuples in general do not have to require a specific order since you keep all the results anyway, so the above could break. by defining tuples to be evaluated with the same order, the problem would be solved.

Reply via email to