Skip to content

Comment on Go vs. Rust: Writing a CLI Toolparent

Comments

Rust can statically prove there are no data races, Go cannot.

Rust offers statically checked deterministic destruction, which makes handling non-memory resources much safer from leaks. Failing to dispose non-memory resources properly (e.g in databases) may be considered a correctness problem. Rust helps in this area, Go doesn't.

Does Go have anything even close to clap/structopt?

Yes, though unlike Rust they use reflection: https://github.com/alecthomas/kong (my own)

Thanks. Looks good. The reflections don't bother me (that's the way to go with in Go).

For cli apps it doesn't really matter if it's reflection-based

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.