3 ms·
> you have to learn what "+" does, so why not remove that and just have "-" since you can subtract negative numbers to add. Because "-" is part of the domain l
by lmm 11y ago
> you have to learn what "+" does, so why not remove that and just have "-" since you can subtract negative numbers to add.
Because "-" is part of the domain language (mathematics).
> The concept of incrementing or decrementing a value is trivial.
For a normal function (i.e. something that could be implemented as library functionality) then I agree with you. But for a language-level operator, it's a special case. It probably has its own precedence. It definitely complicates the metamodel.
> If you're going to campaign against "++", might as well go all the way back to BASIC days and only allow "x = x + 1"
I would. How many times do you need to add 1 to something anyway?