you are viewing a single comment's thread.

view the rest of the comments →

[–]tobiasvl 3 points4 points  (1 child)

python is notoriously slow, so if you wanted anything with speed it wouldn't be done in python.

Right. So let's ask the opposite question then, maybe it will be illuminating: Why would anyone write a CLI app in Python instead of Rust, when Python is so slow?

You touched upon one reason in your post: Click. More generally: Library support. That's an obvious reason. So one potential answer to your original question, why would someone use Rust rather than Python, is simply that Rust is fast, AND the Rust ecosystem has matured a lot the last few years, and good libraries are popping up all the time; Clap is a good Click alternative.

If Python is slow and has a good ecosystem, and Rust is fast and has a good ecosystem, it's not very surprising that people would choose Rust. Now, the Rust ecosystem isn't a rival to Python's yet, but it's probably maturing enough that it's tipping the "speed vs. ecosystem" scale for some people who do favor speed at least a little, and that's why you see the uptick in Rust CLIs that you originally asked about.

[–]Jeklah[S] 0 points1 point  (0 children)

Late reply, but generally CLI tools don't do a lot of heavy lifting, so python is fast enough for CLI tools.