I would say:
- Avoid async if you can. It's way more difficult and error prone than non-async Rust. Unfortunately a lot of web stuff insists on async.
- Don't be afraid to
.clone()stuff to fix lifetime errors. It's not optimal but consider that in C++ everything is pretty much cloned by default, and nobody ever said C++ was slow. - Use
anyhow::Resultfor error handling. It's the easiest option.
That's kind of the point. You can do it in most languages, so why use a shitty one like Bash? Use a good language like Rust!
Also there are aspects of languages that make many languages less suitable for this application though. For example Python, because you can't use third party dependencies (or at least you couldn't; I think
uvhas an equivalent ofcargo scriptnow). Java would be a pretty awful choice for example.