Re: [dev] Local vs global variables

From: Robert C Corsaro <rcorsaro_AT_optaros.com>
Date: Fri, 06 Nov 2009 12:43:31 -0500

QUINTIN Guillaume wrote:
> Hi all,
>
> Someone just told me that, when writing C code, one should NOT use ANY
> global variables. He did not tell me to use global variables as few as
> possible, he did tell me to use ABSOLUTELY NO global variables in any
> kind of C code (single program, library, OS kernel, any kind there is
> ...)
>
> What do you think about that ?
>
> Regards.
>
>
If you think of types and functions as variables then this is
impossible. A better rule might be to never use mutable global variables.
Received on Fri Nov 06 2009 - 17:43:31 UTC

This archive was generated by hypermail 2.2.0 : Fri Nov 06 2009 - 18:00:05 UTC