Comment on What are the recommended scripting languages for complex shell scripts beyond bash?

snowe@programming.dev ⁨1⁩ ⁨year⁩ ago

Really surprised no one has mentioned Ruby. It’s installed by default on almost every system out there (unlike python), it will have the same features on every platform (unlike python where you might get 2.7 or 3.x depending. It’s simple and easy to read, and only slightly more verbose than bash. It’s very well suited for scripting (please don’t use it for application work). It also took a lot of its design from Perl, which a bunch of people are mentioning in this thread, and as a result has a ton of the features of perl, along with a ton of features from other languages. Rust is heavily based on Ruby’s design, and i’ve used Rust to create cli programs and I wouldn’t recommend it. It’s good, but most cli programs don’t need the difficulty of rust for the benefits that rust gives.

Anyway, python has a really really good cli library called Click, but that’s about the only good thing about it. If you are looking to use this script on multiple systems then Ruby will be much easier to transfer between systems (it will just work). I’ve deployed complex python, rust, and ruby CLIs across an org and Ruby was the only easy one. Rust was second easiest, Python absolutely terrible.

If you’re not deploying this to other platforms or sharing it across a team or something like that then a lot of the downsides and upsides here don’t really matter. Just use the easiest language.

source
Sort:hotnewtop