3 ms·
>If "++" seriously trips you up as you learn to program, perhaps programming isn't for you... And by induction you can use this argument to allow any amount of
by aninhumer 11y ago
>If "++" seriously trips you up as you learn to program, perhaps programming isn't for you...
And by induction you can use this argument to allow any amount of bullshit in a language.
>"+=" is no better.
"+= x" saves you from "= long_variable_name + x" which is arguably less readable.
"++" saves you from ... "+= 1" which is already entirely clear, and I have no idea why anyone feels the need to shorten it.
Sure it's a relatively small complexity cost, but it's also an even more microscopic advantage.