When you're actually starting up (you set the context to "someone starting to learn rust"), there will be some unknown things in any language. You'll get there, but you don't need to understand it from the beginning. If you do want to understand it, then you should get it from the official guide. Errors, dyn, box, lifetimes and send are covered.
"Value on the heap, which implements the error interface, is available forever, and can be shared between threads" is... not that complicated.
> Now you put it in production and it breaks.
If you're still learning the language and don't understand the boilerplate, you don't put your app in production.
> Why would I pass in a mutable reference when all I need is a global static immutable value?
You missed the context. The fragment was about a mutable global. If you just need an initialised, but immutable config, you pass a non-mutable reference.
When you're actually starting up (you set the context to "someone starting to learn rust"), there will be some unknown things in any language. You'll get there, but you don't need to understand it from the beginning. If you do want to understand it, then you should get it from the official guide. Errors, dyn, box, lifetimes and send are covered.
"Value on the heap, which implements the error interface, is available forever, and can be shared between threads" is... not that complicated.
> Now you put it in production and it breaks.
If you're still learning the language and don't understand the boilerplate, you don't put your app in production.
> Why would I pass in a mutable reference when all I need is a global static immutable value?
You missed the context. The fragment was about a mutable global. If you just need an initialised, but immutable config, you pass a non-mutable reference.