Re: [dev] Local vs global variables

From: Szabolcs Nagy <>
Date: Mon, 9 Nov 2009 13:54:21 +0200

On 11/9/09, A.J. Gardner <> wrote:
> Remember that every subscriber to this list receives your email when
> you click send. Think hard about whether EVERYONE should have to read
> your email.

i don't mind random discussions.. if they are technical

anyway there are cases when mutable globals are useful, but if the
problem can be solved using local variables then rather use those
(..there is a reason why lexical scoping was invented)

in case of multitasking reentrant functions are easier to reason about
(especially in case of preemptive multitasking)

however passing around context pointers just to avoid using globals
might not be justified
Received on Mon Nov 09 2009 - 11:54:21 UTC

This archive was generated by hypermail 2.2.0 : Mon Nov 09 2009 - 12:00:03 UTC