Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKhatharr

Posted 14 November 2012 - 05:21 AM

What's the price of a global variable?


Loss of access control. (Also violation of dogma.... j/k)

Globals can be reached by parts of the program that have no business reaching them and can result in serious design problems later on. It's a matter of whether or not you're working with people that can't handle the responsibility. Sadly this is a lot of people, from what I hear. Once things get complicated it can become nearly impossible to have reasonable state expectations for something with global accessibility.

That's a good article you got there, Hodge.

#1Khatharr

Posted 14 November 2012 - 05:16 AM

What's the price of a global variable?


Loss of access control. (Also violation of dogma.)

Globals can be reached by parts of the program that have no business reaching them and can result in serious design problems later on. It's a matter of whether or not you're working with people that can't handle the responsibility. Sadly this is a lot of people, from what I hear.

PARTNERS