7 ms·
Go has increment operators, but they have to be in their own statements, you can't intermingle them in an expression. The reason is, putting them in the same l
by SamReidHughes 11y ago
Go has increment operators, but they have to be in their own statements, you can't intermingle them in an expression. The reason is, putting them in the same line as other stuff makes for a higher chance of bugs. For example, Tarsnap's CTR bug happened because of this. The removal of a nonce increment would have been very obvious if all increments had to be on a separate line, either by language fiat or properly risk-averse C coding practices.