I’m learning Go and can’t understand one thing, why creators of this language do support simultaneous assignment? It is very easy to make mistakes like a, b = a, b and not a, b = b, a, as I would want, thanks in advance for any good explanations.
Share
If simultaneous assignment were not available then you would have to do something else instead. An alternative approach might look something like this:
That’s much easier to get wrong.