In the past years we have witnessed probably the fastest adoption of a new language, Rust. This article explores the question "Are we moving too fast?".
A little background about me, I started programming in Java, then I learned c++, got bored so I learned Rust and at the end, I learned C. Rust was the first programming language that I really felt like I like it, but one of my friends told me that I should also give C a chance. In less than a month after starting out, I've started rewritten the project I was working on from Rust to C.
This project showed me that there is more to this story than it seems. For example, today, I was searching reasons why use Rust over C, and what I found shocked me. There was an article that said that you have to explicitly destroy every object(I mean even the integers allocated on the stack) in C, no wonder everyone thinks C is unsafe.
And there is the whole thing with using Rust in the Linux kernel which seems questionable if you ask me. The reasons for my thinking:
- The build time would turn into hours.
- Rust has too many abstractions by default.
- It depends too much on the standard library.
The main argument to using Rust over C is safety, but if you want there are some very useful macros and libraries out there that can your code much more reliable.
Many say that C is obsolete because it doesn't have templates/generics, private member variables or namespaces. I disagree because with a bit of creativity, you can actually achieve all of these, more or less in C. Speaking of creativity, when I'm coding in C, because of the limited features, I am forced to write much more creative code that in C++ or Rust.
And as a last note, I recently explored newer programming languages like zig, and that made me realise that one of the best thing about Rust is that is has amazing docs. If you want to learn something about C and use the web for info, you'll find like 4 different sites that explain the same thing with different formatting, which might be confusing for a person who is just starting out.
P.S. I've edited this post to rewrite some sentences.
P.P.S. I am very sad that dynamic arrays didn't catch on.
Opinions are welcome in the comments.