3 minute read

Well actually it is our Christmas break. I’ve been taking time enjoying video games. But before that I’ve had days where I just kept on exploring Rust and C++.

What is Rust for?

Rust is a programming language. Well if you look it up in their official site, they say that it is a systems programming language. It’s on par with C++ in terms of use case and level of control. It is a compiled language. Also, for beginners it is going to be quite difficult to learn.

It is for making programs that never crash.

What do you mean?

The language introduces new concepts that are quite useful. It also has something like OOP but with no inheritance. That’s not a bad thing. That’s a smart thing. Also, there’s more rules when writing the code so you do have to think about it. The compiler is impressive.

It also ships with its own build system + package manager, something that C++ lacks. I mean, sure we can use libraries and frameworks in C++ but there is no standard way of doing so. Which kind of becomes a mess as any developer could just do whatever they want. Rust has its own package manager and it really is one of the things that just makes working with it easier.

Also, rust has rules and it may seem strict compared to C++ but that’s because they want you or us to write code the proper way. The rust language makes it so that the program itself is free not just of syntactical errors but also of logical errors (bugs in short.) Something that C++ doesn’t have so you know beginners tend to end up with UBs which may cause problems in the long run.

Well I wanna learn more…

I’m not a noticable authority in Rust. But I am learning it. Well if you wanna learn it like how I do, I recommend just reading the official Rust documentation in the website. But there’s also a pretty good Rust programming channel called No Boilerplate which shows you the rustic way of code and the benefits that you get both in the short and long term when you make programs in Rust.

No Boilerplate already talks about it in one of his videos but I’ll summarize it here: You actually finish programs in Rust. As what he said, “they’re not abandoned, they’re done.”

What is meant by this is that oftentimes we’d see a lot of packages constantly getting updates and being maintained or whatever to keep up with the trends or to fix errors or to “improve performance.” We end up then thinking that when a package stops updating, it’s dead, it’s outdated, it’s unreliable. That’s not true for Rust. If a package needs to be constantly maintained, constantly needs improvements, don’t you think that it was released too carelessly in the first place. Sometimes those packages present breaking changes and we end up rewriting parts of our codebase to keep up. That is bad. If you write it in Rust and it works and you made it work as best you could, it is done. It has been written already in such a way that no insane bugs will arise. The program will never crash. Everyone could just use it even after a decade. Even if the program is old, it is there, as powerful as Rust is on the day you get the package.

That kind of idea is very appealing. We’d rather work on things that actually matter. Not on rewriting the same thing with not much gain over a million times. Web frameworks suck for doing that.

Updated: