I was reading TLDP and noticed that all global variables and functions are declared static. After further reading, I understand that the variables are declared static to reduce namespace pollution.
According to this SO post,
static functions are functions that are only visible to other functions in the same file (more precisely the same translation unit).
Hence declaring functions as static will reduce namespace pollution. But, in the case of variables, according to TLDP:
When a Static variable is modified by a module, all other modules will see the new value.
it would increase namespace pollution. Aren't global static variables also visible to the same translation unit? If so how the above quoted statement true? I seem to be missing something.