When using integer values in my own code, I always try to consider the signedness, asking myself if the integer should be signed or unsigned.
When I\'m sure the valu
a signed
return value might yield more information (think error-numbers, 0
is sometimes a valid answer, -1
indicates error, see man read
) ... which might be relevant especially for developers of libraries.
if you are worrying about the one extra bit you gain when using unsigned
instead of signed
then you are probably using the wrong type anyway. (also kind of "premature optimization" argument)
languages like python, ruby, jscript etc are doing just fine without signed
vs unsigned
. that might be an indicator ...