I’ve been working in Rust for a few weeks now and I’ve had some strong, if mixed, feelings about the language, its tools, and its libs.
Impressive performance characteristics
The Initial results indicate that the Rust version of the Sudoku Generatorperforms nearly identically to the C++ version, once both are optimized. I’ll cover this more in a future post.
Something I’ve appreciated about newer languages are the tools they include out of the box. Rust is no exception, and comes with tools for dependency management, tool version/extension management, test facilities, and documentation generation. When languages omit these tool the community has to provide them without coordination. This leads to unnecessary fragmentation and confusion.
Getting a project going is relatively easy. Assuming that dependent libraries are easy to work with (not a guarantee) it’s pretty easy to get a Rust project going.
Wow the memory rules are thorough
The raison d’etre of rust is the type safety guarantee of the compiler. This is remarkable. Other languages that provide type safety (e.g. Java, Go, Python) do so with run-time checks. Rust has to implement some very strict rules in order to do so at compile time. This means that some very common behaviors, such as referencing members of a vector, can be difficult.
I’m not yet sure if this difficulty is worth the effort for the types of programs I end up working on. But, thinking about memory usage and ownership (especially working with modifying data structures) expands my mind, and helps me grow as a programmer.
Varying Quality of Packages
Variation in library quality isn’t exclusive to Rust (cough cough… well everyone), but it is exacerbated by Rust’s relative young age, strict compiler rules, and small community.
This is a problem that the community recognizes. The Rust lib blitz is a cool idea, but I think there needs more uptake by businesses. Creating large scale quality requires a ton of work, and at some point requires commercial buy in. I’m not sure where that comes from.
The domains where the language feature’s set are a clear winner are not obvious to me. High performance, and type safety are great for every domain, but the steep learning curve means a smaller developer pool and smaller set of high quality libraries to choose from. It’s a tough choice to make for in a setting where the extra effort has to be justified, especially when Go (less flexible, but easier to learn) is out there.
Keeping with it
Despite the frustrations I’m going to stick with Rust. I like their priorities and the tooling they have created. Getting dependencies installed and working requires way less time than with C++. I’ve found the memory rules more interesting than annoying. And the high performance is really rewarding.
It’s hard to see using Rust to prototype any product ideas or advocating use it at work anytime soon. For now I’ll be using it to create small command line utilities and any projects where performance is at a premium.