Gopher Protocol@programming.devtoProgramming@programming.dev•What are the recommended scripting languages for complex shell scripts beyond bash?
·
1 year agoRust is heavily based on Ruby’s design
I would not say "heavily based". Literally only the closure/lambda syntax, which is cosmetic. Rust is mainly inspired by ML-family languages and C++.
I think Ruby is a reasonable choice for small scripts which someone might otherwise use Python for. But Rust is very well suited to more complicated or long-lasting command-line tools, especially if performance is at all a concern. Clap alone is super nice, but there are a lot of awesome libraries for making rich CLI tools easily.
- colored or owo-colors for adding terminal colors super easily
- crossterm for cross-platform terminal feature support
- rustyline for all your fancy readline needs
- cursive for TUIs
- comfy-table for command-line tables
And like....a hundred more I could mention. Idk, for anything that's not completely trivial, which will be used and maintained by humans and not thrown away, Rust is really nice.
Hmm...
???!!!
Oh. It's a bit cheeky to do runtime ref counting under the hood and then go and say you don't rely on garbage collection. It's not a full tracing garbage collector - it's worse, it lets you create dangling references and then panics at runtime.
Inko looks interesting, for sure, as a Rust-lite that makes some kinds of code easier to write at the cost of more potential panics (safer, maybe...but desirable?). I'm not sure it's for me though.