Back to blog
C vs. Rust: A Beginner's Perspective

September 22, 2025 (4w ago)

Starting with high-level languages like JavaScript, I've realized C's power and challenges with memory management, leading me to explore Rust's compile-time memory safety

I started my computer science journey with JavaScript and TypeScript, and for the first two years, most of my work was in those languages or Python. For the last two months, I've been working a lot in C and have started to realize how much more control a low-level language provides.

I recently gained a bit of experience with memory management—a concept we rarely have to worry about in TypeScript or Python. This part was extremely counterintuitive for me, and I'm still working my way around malloc, calloc, and freeing pointers.

While C has its merits and the ability to spot a lot of issues at compile time, memory-related problems often occur at runtime. Code that might seem okay to a beginner could actually lead to a memory error, and the catch is, you often can't spot this until the function runs. Of course, the more experience you get with C, the better you'll become at memory management. However, even big tech giants face many of their security vulnerabilities due to memory allocation errors.

This is actually where Rust shines. From the little I've read about it, Rust helps you spot memory allocation errors at compile time, which significantly reduces the probability of a runtime error. I'm still digging into Rust's basics and constructs, and I'm excited to see what else it has to offer.

If you liked the blog, do consider:

Buy Me A Coffee