I’ve reached the conclusion that Global Variables are not bad (!).

The underlying problem is visibility, i.e. can you see all of variables in one window, can you grok what the relationships are?

Old BASIC programs didn’t have this “problem” - until programmers started making huge BASIC programs that wouldn’t fit onto one screen.

FP prescribes lassoing all variables as parameters that can fit onto one window. There are other ways to contain this “problem”, but, the FP cult wants you to believe that theirs is the only way.

A different option: use layers that obey the Rule of 7, and do not allow inheritance so that when you look at a code in a window, you know that it won’t ever change. Instead of inheritance, use Parental Authority (which I credit Harel for).

References

https://guitarvydas.github.io/2024/02/17/Parental-Authority.html

https://publish.obsidian.md/programmingsimplicity/2023-04-03-Rule-of-7

Appendix - See Also

References

https://guitarvydas.github.io/2004/01/06/References.html

Blog

blog

Blog

obsidian blogs (see blogs that begin with a date 202x-xx-xx-)

Videos

videos - programming simplicity playlist

Books (WIP)

leanpub

Pamphlets

gumroad

Discord

Programming Simplicity all welcome, I invite more discussion of these topics, esp. regarding Drawware and 0D

Twitter

@paul_tarvydas