Why people dislike global variables so much while I find them so convenient?

Kyle kyle at kyle.kyle
Tue Jan 25 16:19:31 UTC 2022


On Tuesday, 25 January 2022 at 15:47:12 UTC, Ali Çehreli wrote:
> ... 
> https://www.safetyresearch.net/toyota-unintended-acceleration-and-the-big-bowl-of-spaghetti-code/...


This is a good read, other than this paragraph:

"Other egregious deviations from standard practice were the 
number of global variables in the system. (A variable is a 
location in memory that has a number in it. A global variable is 
any piece of software anywhere in the system can get to that 
number and read it or write it.) The academic standard is zero. 
Toyota had more than 10,000 global variables."

I couldn't help feeling like the article was describing a 
particular .NET project my job has me assigned to.


More information about the Digitalmars-d mailing list