DEV Community

Cover image for Rust is not hard! Part 1: GitHub Actions

Rust is not hard! Part 1: GitHub Actions

Dylan Anthony on May 02, 2023

The most common description of Rust I hear is something like, "it's great for performance but too hard or cumbersome or annoying for most tasks." I...
Collapse
 
chiboycalix profile image
Igwe Chinonso

curios to know why you think Rust is better than Go. I just started learning Go and I had to picking between Learning Go and Rust.

Collapse
 
dbanty profile image
Dylan Anthony

I could probably write an entire post on just this topic, but I don't think any would be as thorough as fasterthanlime's several posts. I'll just clarify on the main point I was making in this post, which is the tooling.

The biggest gap in Go tooling is the lack of official, complete, built-in linter (go vet only catches a tiny subset of issues). This means the community is split between a great many linters, so picking a set of them requires research and every Go project will have a different set of coding standards. It also means that there is no one place to put new recommended lints, so when the community decides on a new best practice, you may not learn about it without seeking out new tools! There are also more abandoned or archived Go linters than most other languages have linters in total 😅.

In contrast, clippy (Rust's linter) is a one-stop-shop for all of your linting needs. New lints are regularly added to keep up with the latest recommendations for Rust code. It catches all sorts of potential problems and outright bugs by default, with the ability to easily enable more restrictive checks.

Other examples of tooling gaps:

  • Godoc doesn't let you have inline code/tests or use any sort of markup
  • Dependencies are expected to be on v1 forever, which they almost never are, so usually adding a dependency defaults to an out-of-date version
  • The linker can't handle circular references, which requires some hoop-jumping with package names
  • go test is super terse, and usually doesn't tell you specifics about why tests failed. Every major Go project I've worked on also needs to include external testing libraries since the built-in ones require too much boilerplate to use
Collapse
 
0xdonut profile image
Mr F.

Thanks for a really well written and insightful article. Looking forward to more from you!