What's so special about adding/subtracting 1 to/from a floating point value that it deserves a dedicated operator?
double a = -0.001234129;
a++; // ?
I've never felt the need to use such a construction; it looks really weird to me. But if I ever had to, I'd feel much more comfortable with just:
a += 1;
Maybe it's because of my strong C++ background, but to me it makes a variable look like an array indexer.
Is there any reason for this?
My guess is that the reason is consistency with C/C++.
I agree with you, that it's kind of weird - the '++' operator has some special meaning for integer values:
For floating point numbers, however, the value 1.0 is not any special value (from machine point of view). You also shouldn't use it for iterations (in other words: if you're using it you should usually consider using an int) as well as it doesn't have a designated INC assembly instruction.