Earlier this week, I shared in my yearly review that I would like to learn a new programming language next year and chose Rust. So today, I thought I'd write down my decision-making process and why I think Rust is a good language to learn.
In general, learning a new programming language is fun and can open up new perspectives on software engineering. It can become an indispensable tool in your engineering arsenal and encourage you to build things that you never built before. But why Rust?
Curiosity
I read that Rust is the most loved programming language among programmers, and it tempts me to find out why. Of course, Rust is not well suited for everything (as any programming language), but it does exceptionally well for the things it is.
At this point, I'm a complete beginner in Rust. I've never written any production Rust code or ran a service that uses Rust. I only spent a day reviewing their excellent docs and checking some data-structure examples using Rust. So it's likely there are things that I don't know and might miss in this post.
Compiled language
I missed working with compiled languages. I've been primarily using interpreted languages for the past couple of years. At work, I use Typescript for building tools, services, and CLIs for developers, and for my side-projects, I use PHP and Javascript. The last time I had a chance to work with a compiled language was during my internship at Twitter. I used Scala to build backend services and remember having a hard time understanding the Futures and Promises. I would spend hours and days on trivial things trying to debug requests, but with the help of my great mentors, I got the hang of Scala. It felt amazing. Struggling on challenging problems but eventually solving them is programmer's high.
I want to work with a language without overthinking runtimes and dependencies, which I usually struggle with when working with Node. I miss simple executable binaries and their portability. To run my program in a new machine doesn't require moving the whole runtime with me.
Learning about computers
Rust is a systems programming language, and it can teach me more about computers and how they work under the hood. I have a Computer Science background, but I need to revise many Operating Systems (OS) internals like memory management, process management, and networking. Working with programming languages that provide high-level abstractions doesn't require this knowledge. So it's good in the sense that it makes working with software more approachable but at the same time limits how much you can optimize by going deeper in the stack.
Will I need this knowledge in my work? I don't know yet, but it can help me reason better with the systems I build at work.
Performance
My current professional focus is productivity engineering. Rust is fast and will allow me to build performant and reliable tools for developers. I believe the next evolution of developer tools will focus on developer experience and a large portion of that experience is performance.
Performance is a force multiplier for productivity, and we should treat it as a critical product feature. Building fast feedback environments and tools is vital for developer velocity. I'm hoping if I learn Rust, I can make the speed as a first-class citizen in my tools.
Serverless
I believe serverless will become more mainstream in the next couple of years, and many engineers will build their backend infrastructures using serverless technologies. I used AWS serverless stack to build Cronhub Scheduler, and it's the best decision I made. Since the launch, I didn't spend any minute fixing things. The best benefit of serverless is peace of mind and low maintenance cost. It's there and works so you can focus on providing value to your customers.
Since I plan to use more serverless in the future, knowing that AWS Lambda supports Rust runtime is a big plus. I can build backend APIs powered by Lambda Functions that run Rust.
I know there are many things I don't know yet about Rust, but maybe it's a good thing. It can be a bumpy road along the way, but I'm excited about my journey.