Why is the command line arguments count variable (traditionally argc
) an int
instead of an unsigned int
? Is there a technical reason for t
The Google C++ Style Guide suggests never to use unsigned int
types unless you're working with actual bit patterns. Their rationale applies to C as well. Quick summary line:
... C's type-promotion scheme causes unsigned types to behave differently than one might expect. ... Don't use an unsigned type.
This was probably not in the minds of the original creator's of C, but who knows‽