https://dave.cheney.net/2017/06/11/go-without-package-scoped-variables
Interesting exploration of avoiding all global state. Perhaps main() should take stdin, stdout and stderr as args?
Related Posts
I'm coming round to the view that a main function shouldn't take arguments.
For example, in Rust you have to call std::env::args() to get CLI arguments.
This makes Hello World less verbose, and gives you more flexibility in setting up CLI argument parsers.
Exploring design ideas using AI as a learning assistant, for creative exploration: https://andymatuschak.org/hmwl/
Go has an elegant approach to defining example functions, which are shown in docs as `main()` with the output: https://go.dev/blog/examples