Re:It's not what programming languages do, it's what they sh...
by tonyarkles on Friday March 27, 2020 @12:02AM
(#22700348)
One of the problems I’ve encountered in the wild is that globals often mean that you have to check the entire program when things go weird. You’re right: if you have a complete understanding of the entire codebase, then it probably won’t be an issue. But software grows and ages; globals won’t hurt you (much) early on in the project, but they start to in the long term. Your coworker modifies it in a place where you don’t realize it’s being modified, and things that worked fine yesterday stop working. The coworker might be you when you’re tired :)
[ Parent
| on HN ]
There are no comments on this comment yet.