Rust is a relatively young programming language, but has been favored by companies such as Amazon, Facebook and Google for a while now. They write their code (partly) in Rust, saying goodbye to C and C++.
Recently, it became clear that Rust is also gaining popularity among other big players. This includes Mark Russinovich, CTO at Microsoft. On Twitter, he called for starting no more new projects in C or C++, because these languages are outdated, and using Rust instead.
Linus Torvalds, creator of the Linux operating system, also caught the attention of the tech community. He announced that C will be joined by Rust as a development language in the Linux kernel. And that is remarkable - especially since C++ has never managed to be used in it.
Again, food for conversation - even among us. Can we expect a (r)evolution? We asked Devon Kerkhove, one of our embedded software developers.
Devon: “I completely follow Mark Russinovich when he says that C and C++ have become obsolete programming languages. When I started developing, I wrote my code in C. I soon wondered whether this was really the best thing available to us after all these years of software development. So I started to immerse myself in Rust, and 1 thing is for sure: I wouldn’t want to go back to C.”
solving problems that we’ve caused ourselves.
“Rust has a steep learning curve. Suddenly I had to take into account new concepts, and at first this could be frustrating”, Devon tells us. “Fortunately, there are a lot of best practices that guide developers in their learning process. I am convinced that (young) developers will be more and more inclined to write their code in Rust.”
Devon: “The more I work with it, the more I realize that Rust is, in fact, better. To give an example: when developing in C, I used to lose a huge amount of time integrating other people's code into mine. In fact, that process is so time-consuming that many developers find it easier to rewrite all the code themselves. And that’s just not ideal.”
“In C++, that process was slightly better, but it still took time. In Rust, it only takes me 2 seconds to integrate existing code into mine, because everything is standardized. If my project compiles without error messages, I am 100% sure that the existing code is bug-free. So I am much more productive.”
In time, C and C++ will become outdated languages, and thus less attractive to young developers. Educational institutions cannot ignore this evolution and should include Rust in their curriculum.
“For me, the biggest advantage of Rust is definitely the security guarantee. In C, as a developer, you are often solving problems that you’ve caused yourself.”
“A lot of bugs in C and C++ you no longer encounter in Rust. This is because in Rust, you are obliged to follow certain coding rules. If you don't, you automatically get an error message and are obliged to correct your mistake immediately. In C and C++, that safety is not built in, so errors are only discovered in the QA phase or - even worse and more costly - when the program is already running in the field.”
should all companies follow this new trend?
Devon: “The big players are giving off clear signals, and these are being picked up by us and in our neighboring countries. TU Delft, for example, will include Rust in its curriculum starting from the next academic year, and hopefully our educational institutions will follow suit. That would mean that in a few years' time, the first big load of Rust developers will graduate.”
“Rust is the future, that much is clear to me. I would therefore encourage companies to start thinking about what this evolution to Rust could mean for them. Cost savings are a fact: I've never been more productive and my code is super high-quality. So the benefits are definitely there.”
“It is true today, though, that many companies already have a codebase for ongoing projects. And as long as that works, they aren’t inclined to change everything. In the case of new projects, where code still needs to be written, companies are increasingly seeing the benefits of Rust, and are abandoning C and C++ for the first time. The shift within software development is definitely happening, and I am happy to be able to witness this evolution from the front row!”