It’s time to stop using C and C++ for new projects, says Microsoft Azure CTO

It’s time to stop using C and C++ for new projects, says Microsoft Azure CTO

Developers should avoid using C or C++ programming languages in new projects and instead use Rust because of security and reliability concerns, says Mark Russinovich, the chief technology officer of Microsoft Azure.

Rust, which hit version 1.0 in 2020 and was born at Mozilla, is now used within the Android Open Source Project (AOSP), at Meta, Amazon Web Services, and Microsoft for parts of Windows and Azure, Linux Kernel, and in many other places.

Engineers value its ” memory safety guarantees”, which reduce the need to manually manage a program’s memory, and in turn, cut the risk of memory-related security flaws burdening big projects written in “memory unsafe” C or C++, which includes, Chrome, Android, the Linux kernel, and Windows.

Microsoft drove home this point in 2019 after revealing that 70% of its patches in the past 12 years were fixed for memory safety bugs largely to Windows is written in C and C++. Google’s Chrome team weighed in its own findings in 2020, revealing that 70% of all serious security bugs in the Chrome codebase were memory management and safety bugs. it’s written mostly in C++.

“Unless something odd happens, it[Rust] will make it into 6.1”, wrote Torvalds, seemingly ending a long-run debate over Rust becoming a second language to C for the Linux kernel.

He also stated, “Speaking of languages, it’s time to halt starting new projects in C/C++ and use Rust for those scenarios where a non-garbage-collected (GC) language is required. For the sake of security and reliability. The industry should consider declaring those languages as deprecated”.

Indeed, Russinovich added later: “There is an enormous amount of C/C++ that will be maintained and evolve for decades (or longer). Last night I coded a feature for Handle, adding to the roughly 85,000 lines of Sysinternals C/C++ code I’ve written. That said, I’ll bias towards Rust for new tools.”

Rust is certainly moving forwards and is likely to be in the Linux kernel soon.

The AOSP, which is a Linux distribution, started using Rust on new code in April 2021 but left its C/C++ code base in place. That month, AOSP also backed calls for Rust as an option for new code in the Linux kernel.

Leave a Reply

Your email address will not be published. Required fields are marked *