Recs.
Updated
Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.
SpecsUpdate
Pros
Pro Helpful compiler
Since Rust is statically typed, you can catch multiple errors during compile time. This is extremely helpful with debugging, especially compared with dynamically typed languages that may fail silently during runtime. The compiler usually gives good explanations about what you did wrong and sometimes even proffers ways to fix things.
Pro Dependency management
Rust has a simple-yet-advanced, platform-agnostic build and dependency management system called Cargo. Cargo provides a convenient and near effortless means to distribute reusable packages called crates. One can even define Git repositories as dependencies. At the same time, use of this system is entirely optional and reliable alternatives--such as Bazel--are readily available.
Pro Generics support
You don't have to write the same array and dictionary classes hundreds or thousands of times to get strong compile-time type checking.
Pro Supports cross compilation for different architectures
Since Rust 1.8 you can install additional versions of the standard library for different targets using rustup/multirust
.
For example:
$ rustup target add x86_64-unknown-linux-musl
Which then allows for:
$ cargo build --target x86_64-unknown-linux-musl
Pro Makes developers write optimal code
Rust is a modern programming language written around systems; it was designed from the ground up this way. The language design coerces developers into writing optimal code almost all the time and enables optimization of your program without requiring full knowledge and understanding the compiler's source code or the internals and quirks of your target processor(s)/architecture(s).
Furthermore, Rust does not copy from memory unnecessarily, to give an example: all types move by default and not copy. Even references to types do not copy by default. In other words, setting a reference to another reference destroys the original one unless stated otherwise.
Pro Advanced, sanitary macros (a la lisp)
Macros facilitate code deduplication at a level unachievable with functions/classes/traits alone. Rust's macros are not like those from C/C++. They are safe, sanitary, and support strong-typing. Notable features include pattern matching, recursive invocation, and a small macro grammar (DSL).
Pro Threads without data races
Unique ownership system guarantees a mutable data to be owned and mutated by only one thread at a time, so there's no data race, and this guarantee is checked at compile time statically. Which means easy multi-threading.
Of course, immutable data can be shared among multiple threads freely.
Pro Experienced developers can rapidly prototype & deliver products
Out of all the systems languages, and even non-systems languages, Rust seems to make its users the most productive. This phenomenon is an increasing trend which is regularly reported by those who have gained enough experience with Rust to call themselves Rust programmers.
Newcomers often struggle with the borrowing and ownership mechanism, lifetimes, traits, generics, and all manner of concepts and capabilities that Rust offers which their University of choice, or languages that they were familiar with, did not prep them for. Yet once you have learned these concepts and internalized them, the static analysis offered by the compiler becomes one of your greatest assets to your development.
With the rules internalized, there is never a time where you will fight with the borrow checker. It will simply point out mistakes that you've made along the way, and are usually addressed within a minute or two. It also makes major refactoring simple. Once your project compiles, there's a pretty good chance that it will work correctly on the first try. Any issues you encounter throughout development will exclusively be basic logic bugs, rather than critical issues common of other systems programming languages.
Cargo is also no slouch, and in combination with Crates.io, it is trivial to develop, publish, discover, and use crates from the official crate repository within each of your software projects. Any small problem which can be made generic or separate from a project will likely be chipped off and wrapped in a crate for others to use. These crates can then be collectively audited and put to use in the wild, in real time. This makes it possible to develop highly optimized data structures and routines, and then quickly propagate them across the entire industry.
The performance is the cherry on top. A prototype is easily transformed into a final product with a bit of optimization. Rewriting entire portions of your architecture to be highly parallel with a fine degree of granularity is also simple, due to traits like Send & Sync ensuring that data is properly shared across thread boundaries, and the borrowing and ownership system which ensures proper memory access patterns across threads.
Pro Guaranteed memory safety, better than Nim with error help
With the outstanding ownership and borrowing system, no garbage collector, efficiency, concurrency, and intuitiveness backing it all up, these features make Rust the greatest language for Systems programming, especially with its larger base than Nim.
Pro Welcoming community full of talented engineers
The ecosystem of libraries is full of modular, ergonomic, and performant code written by many people smarter than I. It makes working with libraries a pleasant experience and one that is even better given Rust's notoriously friendly community.
Pro Easy to write understandable code
While not as verbose as Java, it still is much more verbose than languages like Go and Python. This means that the code is very explicit and easy to understand.
Cons
Con Integer generics unsolved
Although Rust supports generics, it does not yet support integer generics. Crates exist to alleviate issues with this, but the ultimate solution has yet to be done. This also affects generics with fixed-size arrays, although array slices are easily used as a workaround.
Con Does not provide stable ABI yet
The language does not provide stable ABI yet: different versions of the compiler may provide different backward-breaking machine code. There are a lot of things to be done before stabilizing the ABI. So if Rust-developers want to have stable ABI they use C
one. As another result, every crate in Rust must be statically linked today.
Con Rust not as safe as it pretends to be
Rust problems:
1) Massive undisclosed usage of unsafe.
2) Massive amounts of memory safety CVEs - see details.
3) Large bloated Rust binaries increase attack surface for exploits.
4) Many corporate types claiming Rust is safe, don't actually program or use it (have some quiet financial interest to push it).
Con Very ugly and verbose syntax
Compared to many languages. One tool needed to be productive is the language to be pleasing and effective, yet rust friction is as high as its safety.
Con Not as useful or productive as advertised.
If really out here wanting to use something besides C/C++, in 98% of use cases, would do just as well or be better off using something other than Rust. Will complete the project faster, would be easier, will be happier, and nearly as safe (use newer language with optional GC).
Con Very new and untested
At this point, one can look at their Github page and see in the issues that Rust isn't as safe as it is claimed to be. Safety is only second to weird conversations about "harmful" features. Old unsafe bugs don't get solved while discussions about some language feature having problematic names get solved quite fast.
Despite strong claims of "safety first", Rust is still choosing itself what its place actually is. If one were to follow "safety first", Rust is simply not a good option for now.
Con Hard to find learning resources or libraries
Because it's still a relatively new language, Rust does not enjoy a following as large as other languages/environments. Rust development has also been rather volatile for a long time during the beginning of the development of the language adding to this issue.
Because of the small community, it's harder to find useful libraries for projects or any other kind of resource.
Con Immature tooling & ecosystem
Compared to C/C++, there isn't yet the wide range of tools available (IDE's, static analysis, build systems), while unavoidable for any new language and improving over time - its a noticeable down-side.
Recommendations
Comments
Flagged Pros + Cons
Pro Catch errors at compile-time
Since Rust is statically typed, you can catch multiple errors during compile time. This is extremely helpful with debugging, especially compared with dynamically typed languages that may fail silently during runtime.
Pro GUARENTEED MEMORY SAFETY, BETTER THAN NIM WITH ERROR HELP
With the outstanding ownership and borrowing system, no garbage collector, efficiency, concurrency, and intuitiveness backing it all up, these features make Rust the greatest language for Systems programming, especially with its larger base than Nim.
Out of Date Pros + Cons
Con Asynchronous I/O is not (yet) a part of the core language
The issue of asynchronous I/O is still being discussed as a language feature, and not yet in the implementation phase.