[Oberon] INC(i) vs i := i + 1

Paul Reed paulreed at paddedcell.com
Wed May 5 01:09:29 CEST 2021


INC/DEC, like i++ / i+=  and i-- / i-= are also useful to show intent - 
for example when I'm reviewing  someone else's code that says

   i := i + 1;
   j := j + 1;
   k := j + 1;

it makes me wonder... :)

No language or system is completely self-evident, but the idioms used 
often are reinforced by that use and learned quite quickly, and we move 
on. No need to leverage familiarity with another language at all in 
those cases. It's the subtleties that get 'em every time, like the 
equals sign in curly-bracket languages. Are we up to four in a row yet? 
:)

Cheers
Paul


More information about the Oberon mailing list