Hacker News new | ask | show | jobs
by bschwindHN 1849 days ago
You're probably not the only one. However, I will always prefer CLI tools written in C/Go/Rust/anything native because Python dependency management is a shitshow and its startup time is way too slow.
2 comments

But you're bringing up a good argument for preferring a binary over a script there - portability, external dependencies, performance are important factors.

I don't believe performance will be significantly different if you're comparing a C vs a Rust tool though.

IME Rust/Go/Python/Node tools tend to have better ergonomics / feature sets compared to C tools. This can be because the C tool is simply older, but I also think it's because writing and maintaining extra quality of life features is a major pain in C, so they tend not to get added. The same can also apply to performance optimisation in some cases (e.g. multithreading is much easier to add without introducing bugs in Rust than in C).

Rust and Go thus occupy a sweet spot for CLI tools, because they have the advantage of high-level maintainable code AND being fast, easily installable binary executables.

ripgrep is way faster than grep (okay, it's missing some features), but grep is way older.

sd is an order of magnitude faster than sed, but it's missing some features like deleting matching lines.

You could rewrite some of those older core utils written in C to make them run concurrently...

That falls under the case I mention of "tool is superior".