uchicago-mobi / 2016-Winter-Forum

Class Forum for MPCS51030.
3 stars 0 forks source link

Global Variables #210

Closed susanstevens closed 8 years ago

susanstevens commented 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.