Only lazy people haven't written already about how global variables are evil. It started in 1973 when W. Wulf et al. claimed that "the non-local variable is a major contributing factor in programs which are difficult to understand." Since then, many other reasons where suggested to convince programmers to stop using global variables. I think I read them all, but didn't find the one that bothers me most of all: composability. In a nutshell, global variables make code dif...
Published on July 02, 2018 17:00