What was your issue with Rust syntax?
It has too many underscores and it doesn't support global variables.
What is a global variable, in this context, and why would one use it?
A global variable is a variable that can be read and written from everything inside your application and it is awesome for saving states. Sadly, Rust does not know the concept of "static globals".
Just initialize whatever you want to share in the main function and pass it in to where it's needed?
I'm sorry if I sound dismissive, it just really doesn't sound like a good idea.
Words like implicit dependency, side effect, singleton, and not thread safe come to mind.
Why touch something that wasn't passed into your function?
That's not the same thing.
It's definitely not the same, I agree.
Can you give an example of when you'd want to use one?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.