| For future readers, a flagged dead sibling comment said this > Poor child. Wait until you have to build a sufficiently complex web app. Global variables are never the answer "never the answer" is a Fundamentalist Orthodoxy. Look at those words, "fundamentalist" and "orthodoxy". When they are the answer and are needed then instead of a basic global thing some bizarre fundamentalist mind palaces get built. There's say "a singleton object that expose shared properties through a getter/setter pattern" or some other word salad to avoid using the word "global" and avoid making the code look like a global. So weird rules get piled on, maybe some ornate calling convention. These people dress up a global and disguise it in a sufficiently large enough costume so their fundamentalism doesn't get offended. It's simply blind dogmatism and utterly indistinguishable from any other cult-driven purity test. The ceremony is a necessary delusion so they can maintain some imaginary tribal membership to some fiction of "senior developer" they have constructed out of bad advice and empty platitudes by other misdirected self-assessed experts. It's like the anti-climate-change or anti-vaccine people who think they are smarter than everyone; ignorance breeds a confidence that only progresses the pursuit of greater ignorance. Like astrology, these imagined worlds are far richer and more complicated because they have to construct something that follows arbitrary rules and disagrees at a fundamental level with basic realities to prop up mythical narratives holding their tribes together. What a way to build things. |