By Daniel Hughes
Ladies and gentlemen, boys and girls, it is officially Rustin’ Time. As a certain Karl Marx once said, ‘Rustaceans of the world unite, you have nothing to lose but segmentation faults’ (according to ChatGPT at least). So, what’s the hype about this new low level compiled language all about, and why, more importantly, should I, as a high-level programming hobbyist even care?

At the time of writing Rust is now stable and in version 1.76.0. The official website offers several friendly learning resources that walk you through the many features of this incredible language. For developers coming from a background in high level languages especially this will be an invaluable resource to help you understand the intricacies this language has to offer including its unique approach to memory management that is arguably one of its most important features. Rather than the traditional garbage collected approach or simply requiring manual memory management, the developers of rust opted instead to try a novel method of handling manual memory management based off the concept of borrowing and ownership. As opposed to manually inserting calls to deallocate memory required in languages such as C or C++, a practice which is not only tedious but prone to human error, rust’s compiler does this automatically by determining scope and ownership of program data. For someone such as myself, who has never had to deal with memory management, it can be difficult to understand the appeal of Rust’s approach and indeed it initially seemed to me like an unnecessary hindrance to rapid development and iteration. However, memory management by ownership and borrowing does bring many benefits by ensuring that unsafe code that could cause problematic and tricky to debug errors in the future does not compile ultimately saving time in the long run. In fact bugs arising from memory safety issues account for 70% of all security vulnerabilities according to a shocking revelation from Microsoft. Let me be clear; no language is safe from this class of vulnerabilities (especially not Python!) but Rust’s new approach takes strides in reducing this issue. This, perhaps, is why Rust has topped the Stack Overflow developer survey for the most admired language and has risen to the rank of top ten (real) programming language in 2023.

Another of Rust’s many advantages is its helpful and friendly error messages. The compiler is undeniably one of the best around offering developers great colour coding to help make the hints offered even more developer friendly. Error messages don’t just include line numbers of problematic code but also make the issue abundantly clear, even going so far as to offer suggestions on how to fix the problem. If that wasn’t enough, the further information about different types of errors offered by the compiler is a useful tool to learn from. Another of Rusts killer features is its support for multiple programming paradigms including object oriented and functional which allows for some flexibility and familiarity whilst maintaining Rusts promise of zero cost abstraction. The technology and design powering Rust is the culmination of the best parts of many preceding languages as follows;
- Abstract Machine Model : C
- Data types : C, SML, OCaml, Lisp, Limbo
- Functional Programming : Haskell, OCaml, F#
- Attributes : ECMA-335
- Memory Model and Memory Management : C++, ML Kit, Cyclone
- Type Classes : Haskell
- Crate : Assembly in the ECMA-335 CLI model
- Etc.

There are however a handful of downsides to Rust, most prominently its steep learning curve. When one considers the ease with which one can learn, write and iterate in Rust suddenly appears considerably less appealing due the incredible strictness and even pedantic nature of the compiler that forces the developer to write good code. This is sometimes just a hindrance especially when problem solving as one must not only consider how to solve the problem at hand but also how to please the compiler. One particular causes of difficulty can be the concept of ownership which is unique to Rust and as such may take some time even for advanced developers to learn. Thankfully the rich ecosystem surrounding Rust, the community and growing number of learning resources means that these are by no means insurmountable problems and should not put a dedicated developer off learning this revolutionary and robust language.
In my experience Rust has been relatively pleasant to write, despite my very limited time spent learning the language. It was also considerably more concise than I had expected allowing me to write a basic symbolic algebra and graphing system in c. 600 lines. My experience of cargo (the package manager) and crates (like modules/imports in other languages) too was positive as the process was intuitive and relatively simple. In conclusion, Rust is most certainly a language worth learning if you are willing to put in the time to do so as it yields fine memory control and impressive performance encompassed by a friendly ecosystem. If, however, you do not wish to unravel the mystery that is lifetimes, borrowing, ownership, etc. and do not need BLAZINGLY FAST performance then an easy to learn alternative worth considering is Go (or indeed any other garbage collected language).
These are some useful resources for learning Rust:
Official learning resources: Learn Rust – Rust Programming Language (rust-lang.org)
Rust by practice website: Rust By Practice – Rust By Practice (course.rs)
Official rust online playground: Rust Playground (rust-lang.org)
Replit (useful if you can’t or don’t want to install locally): Home – Replit
FreeCodecamp course: Complete Rust Programming Course (freecodecamp.org)






Leave a comment