|
|
|
|
|
by alterom
37 days ago
|
|
>Obviously they are not in this example ...of utter insanity which doesn't belong in any real world code. It just keeps getting worse, and shows why it was a horrible idea to allow this in the first place. >The next line might contain: i++; j *= 42; k = srandom (k), random ();
Then that's where you do the arithmetic.You're already doing it there, why do you need to do an assignment inside the brackets? (This was a rhetorical question. You don't). |
|
It is useful to distinguish between consuming an element and only jumping to it. So you would have an ptr[i++] for consuming the current token, but not, when you are switching to another token.
A grouping of index and array modification also provides clarity about the intention. It would read very annoying if that constantly would be split into two steps, and also provides more room for error.
It's obvious that you do prefer the stylistic choices Go made, but that doesn't mean everyone does.