Closed susanstevens closed 8 years ago
Another interesting question that came up in office hours today -- why not use global variables to maintain state? Here's a post with some good explanations for why global variables are generally considered ill-advised. http://programmers.stackexchange.com/questions/148108/why-is-global-state-so-evil
Note that the networking singletons we've used in homework assignments are different from global variables in that they do not maintain state.
Another interesting question that came up in office hours today -- why not use global variables to maintain state? Here's a post with some good explanations for why global variables are generally considered ill-advised. http://programmers.stackexchange.com/questions/148108/why-is-global-state-so-evil
Note that the networking singletons we've used in homework assignments are different from global variables in that they do not maintain state.