W
Willem
Keith Thompson wrote:
)> Edward wrote:
)> ) If it's ++ it's obviously 1 for the obvious reason (it's an index or
)> ) counter, indexing or counting something). Whereas, if it's +=, that
)> ) implies that there is something special about the added value - and that
)> ) that value might change.
)>
)> It only implies that it's special because you would use ++ where that is
)> not the case. If ++ did not exist, there would be nothing special about
)> += 1, and the 1 would not be seen as a magic number.
)
) Right, in a language that has "+=" but not "++", "x += 1" would be
) the idiomatic way to increment x.
)
)> In other words: you're using a circular argument.
)
) What's cirular about it? C is not such a language. In C, "++"
) is the idiomatic way to increment a variable.
Yes, but the argument is about *why* ++ is the idiomatic
way to increment a variable, so that *is* circular.
IIRC, somewhere in this thread somebody was pleading for the removal
of ++ and -- from the C language, and to use += 1 and -= 1 instead.
And that's what started this thread.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
)> Edward wrote:
)> ) If it's ++ it's obviously 1 for the obvious reason (it's an index or
)> ) counter, indexing or counting something). Whereas, if it's +=, that
)> ) implies that there is something special about the added value - and that
)> ) that value might change.
)>
)> It only implies that it's special because you would use ++ where that is
)> not the case. If ++ did not exist, there would be nothing special about
)> += 1, and the 1 would not be seen as a magic number.
)
) Right, in a language that has "+=" but not "++", "x += 1" would be
) the idiomatic way to increment x.
)
)> In other words: you're using a circular argument.
)
) What's cirular about it? C is not such a language. In C, "++"
) is the idiomatic way to increment a variable.
Yes, but the argument is about *why* ++ is the idiomatic
way to increment a variable, so that *is* circular.
IIRC, somewhere in this thread somebody was pleading for the removal
of ++ and -- from the C language, and to use += 1 and -= 1 instead.
And that's what started this thread.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT