Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMarkS

Posted 26 December 2012 - 07:06 PM

OK, let me ask this...

When is it acceptable to use global variables? In my case, I need certain variables across multiple classes. Encapsulation prevents this. Wouldn't this be a case where global variables would be needed? If the limitations of the acceptable method cause a hindrance, shouldn't the less acceptable method be allowed?

I've tried looking at some of the open source engines, like Ogre, but dear Lord! How anyone can continue development in that obfuscated tangled mess of code is beyond me! I cannot get anything out of it but how to obfuscate code.

#2MarkS

Posted 26 December 2012 - 07:05 PM

OK, let me ask this...

When is it acceptable to use global variables? In my case, I need certain variables across multiple classes. Encapsulation prevents this. Wouldn't this be a case where global variables would be needed? If the limitations of the acceptable method cause a hindrance, shouldn't the less acceptable method be allowed?

I've tried looking at some of the open source engines, like Ogre, but dear Lord! How anyone can continue development in that obfuscated tangled mess of code is beyond me! I cannot get anything out of it but how to obfuscate code.

#1MarkS

Posted 26 December 2012 - 07:03 PM

OK, let me ask this...

 

When is it acceptable to use global variables? In my case, I need certain variables across multiple classes. Encapsulation prevents this. Wouldn't this be a case where global variables would be needed? If the limitations of the acceptable method cause a hindrance, shouldn't the less acceptable method be allowed?


PARTNERS