indraj.net v3
While many programming languages are useful, most are unremarkable in the sense that they do not generate press headlines or attract attention from government agencies. I think the majority of people would agree that this is the normal state of affairs.
However, in recent years, a new programming language known as Rust has been gaining widespread and frankly undeserved publicity, not based on the merits of any innovation in its design or syntax, but rather due to a bizarre static analysis feature of the compiler and the emission of instructions which check for (and rather inelegantly handle) out-of-bounds array accesses at runtime.
In all other respects, it is no different to the median vision of a new C++ if backwards compatibility with C and object-oriented style are not considered to be core goals. Rust inherits misfeatures such as hidden control flow (i.e. RAII) and the tendency to expand with absolutely no regard for orthogonality, conceptual integrity or even the capacity of the human brain. To put it another way, what passes for language “evolution” today will become tomorrow's “technical debt”.
Furthermore, it has several unique misfeatures of its own. Let's start with the concept of “borrowing”, which Rust advocates often praise as its crowning achievement. What this slightly misleading term essentially boils down to is:
According to various statistics, between 65% and 81% of security vulnerabilities in major software products like Google Chrome, Android, Mozilla Firefox, Microsoft Windows and Apple macOS relate to memory corruption. Rust advocates often state that it is the pervasive use of “unsafe” programming languages like C and C++ that have led to such shoddy security.
I have a different theory – what these products all have in common is that their codebases are huge and terrible; full of crufty hacks accrued over decades by people who didn't know what they were doing and didn't care because the customer had already been conditioned to accept substandard software.
Memory corruption bugs are actually just mundane logic bugs with a special label designed to serve the more political purpose of advocating for “memory safety”. They are also the easiest type of bug to spot, which is why they are so well-represented in statistics.
Very few Linux distributions shipped the XZ backdoor in their stable repositories, while Rust programmers using crates.io would probably not have been so fortunate. However, the fast development pace of the language leaves them with no credible alternative. As the number of dependencies goes up, this elevated risk increases exponentially. At the same time, reducing the number of dependencies is a difficult proposition to swallow for many Rust advocates, as it is the main reason why programmers feel more “productive” with Rust compared to other systems-level languages in spite of its awful design. Nevertheless, with increasing regulatory pressure in Europe and other regions of the world, they may eventually be left with little choice.
Go forth and continue writing in C, and don't let the Rust mob scare you. Maybe something better will come along one day, but this isn't it.
Belfast, United Kingdom
Copyright © 2024-2025 Indraj Gandham
Licensed under
CC BY-SA 4.0