Hacker News new | ask | show | jobs
by loudmax 2498 days ago
The Rust Programming Language book includes tests and how to break down code into packages and other good habits: https://doc.rust-lang.org/book/

Coming from a background in scripting languages, Rust is still a lot more difficult to learn than Go, but I found that book very helpful.

2 comments

If you like TDD, checkout rustlings https://github.com/rust-lang/rustlings/. I'd recommend https://exercism.io/, but there's such a shortage of mentors for the Rust track that you can get blocked very easily waiting for feedback. One of my solutions went un-mentored for over a month - and it was only after I asked someone directly to mentor my solution that it passed. If that weren't a problem, I would highly recommend exercism.io
Unfortunately, the code examples in the Rust book still feels like toy projects / toy code.

What I like about the Go book is that it feels production-ready, even though it is simple. This is because it is following industry best practices. There's no "code in isolation", if that makes sense.