Rust: First Impressions

By: Jackson



Having just completed my first project in Rust, rust-chat, I think I'm ready to give a brief initial review of the language. This won't be my last review of the language, so everything said here is subject to change. Despite what I had thought going into this, I might not be giving up on Rust just yet. I have a few more project ideas in mind, given that I've been having fun using Ratatui.



The Borrow Checker

Basically: it gets easier with time. Like most people, I found working around the borrow checker to be a giant pain-in-the-ass. The best analogy I have is that it's like working under a very strict manager. A good manager knows when to let their employees just get on with their work, and when to intervene to help things run smoothly. Rust's Borrow Checker lives on the side of being too strict; I don't need it poking it's head in constantly when I know my code is memory safe. Thankfully, Rust provides several ways for you as a programmer to essentially turn off borrow checking, even if it means incurring a performance loss. I should note that for many cases, it is absolutely necessary to "turn off" borrow checking, which honestly makes me question the whole legitimacy of this system as a method of memory management.


The big "ah-ha!" moment you have about the borrow checker is the realization that it's just a set of syntactic guidelines, rather than a concrete language feature. The borrow checker is not something which is physically enforced, but instead Rust's personal opinion about how you ought to write code. As such, the borrow checker isn't something to be taken all that seriously.


To agree with most other critics of the language, I would say that the borrow checker hasn't exactly increased my productivity. Any amount of time I would have spent fixing a memory error in C++ is instead spent trying to engineer a program structure that works within the borrow checking guidelines. Granted, it gets much easier as time goes on (at least, for now that is). From what I've heard, more complicated applications, such as game development, have a very hard time overcoming this boundary, and I can see why. Video games need to be robust, and that's not something Rust specializes in.


And to clarify, understanding the borrow checker is actually the easiest part of working with it. The concept of memory ownership is pretty easy to wrap your head around, and seeing some basic examples from the Rust Book was all I needed ready to get a hold on it.



The Compiler

It's great. The worst part of my beloved C++ is compiling and linking libraries, so having a modern build system is nice. Rust is also fantastic at describing and often times even telling you how to fix bugs in your code. It pairs nicely with the borrow checker, so much so that my code is almost entirely bug free before I run it for the first time. It prevents bugs before they happen, which has definitely improved my productivity. The compiler can be overly pedantic, especially with its numerous, arbitrary warnings. Seriously, you don't need to remind me every single time that one of my variables or includes aren't being used: I'm usually aware! Also, enforcing a variable naming scheme is completely insane. I like using camel case, but for some reason Rust has to disagree.



Syntax

Initially, my first thoughts on Rust was that it had a grossly over-complicated syntax that seemed hellbent on changing standard language constructs for no other reason than it could. It was very confusing to read and write in starting out. To an extent I still believe this, but as with the borrow checker, it has gotten much easier. Best way I can put it is that it's like using proper mathematical notation. It's hard to read and understand for the uninitiated, but once you've committed it to memory you start to understand its necessity: it's short and precise. That being said, I wouldn't call it better than any other language, just that it's not totally unreasonable.



Closing

I don't understand everything about Rust yet, so more work will need to be done before I have anything conclusive to say about the language. For now, all I can say is that it's not as awful as it was starting out, but I'm still not convinced of Rust's claimed superiority over other languages. That being said, I understand why so many people are obsessed with the language. I won't buy into the cult just yet, but stay tuned for more.


Created on June 4, 2025, 8:17 p.m.



Comments: