Lyndon Samson wrote:

>On 1/9/06, John Maclean <info / jayeola.org> wrote:
>  
>
>>Chaps,
>>
>>I'm not sure were I have read this but I recall a page or two saying that
>>global variables are bad for some reason. I've overcome my main hurdle, of
>>understanding some of the basics of OO.
>>    
>>
>
>
>Interestingly it's allmost universally accepted that Global Variables are
>bad ( in the same camp along with GOTO ), yet instance variables are just a
>more restrictive variation on the same theme, yet they are best practice :-)
>Guess the functional guys hold the high ground here.
>
>  
>
The main advantage of instance variables to global variables is that 
they allow you to scope the variables down to -very- narrow contexts of 
validity, and they can be hidden outside said scope. If that's what you 
mean by "more restrictive variation", then scoping is the restriction 
that matters. And giving context to relate global variables via naming 
conventions sounds pretty painful.

David Vallner