However, Kelly also points out that Rust tends toward safety. Different languages tend toward safety at different rates, and Rust tends toward safety at a high rate for many reasons. In my experience Rust is the safest language that still allows me to accomplish the professional development tasks I do.
[1] https://twitter.com/andy_kelley/status/1554933549999894528
Note that Burroughs doesn't support Assembly, all low level hardware capabilities are exposed as compiler intrisics.
In one sense, saying "X is not a safe language" could mean that X is not a language that exclusively allows proven-safe constructions. One might say that Rust is not a safe language because it has `unsafe`, or Ada is not a safe language because SPARK isn't mandatory.
But this isn't what a typical reader should be expected to understand from the quoted phrase -- to say that Rust is "not safe" is to say that it is unsafe. It feels unreasonable to claim Rust is "not safe" when the same accusation would never credibly be leveled at Go, Java, C#, or other languages that encourage (without mandating) memory-safe programming.
--
> The people saying that safety is all or nothing are toxic and
> Rust community needs to stop turning a blind eye.
There is no such thing as a "Rust community". There cannot be a community for a programming language when (1) there's no way to prevent someone from using that language, and (2) the barrier to entry is an HTTP download and 15-minute tutorial.I never hear about people discussing the "C++ community", or writing on Twitter about how the "Java community" needs to do something or other. It wouldn't fly, there's too many people known to use those languages to ascribe a common motivation to them. Yet when there's a smaller language -- Rust, Haskell, Go, Zig, whatever -- suddenly people start treating them as if they are a group, and criticizing people who use Rust for the behavior of other people who (claim to) use Rust. It's madness.
At best there can be a "posters on Reddit's /r/rust subforum" community, or "posters on Twitter's #rust hashtag community", but these are even more dubious. The only requirement to be a member of these "communities" is an email address and enough sense to not get banned.
Nobody would say "the Twitter #rust hashtag community needs to ..." because it would be obviously silly to expect good behavior from freshly registered user "PmMeToePhotos123456".
Actually, there is: https://www.rust-lang.org/community. It's centralized and they even have appointed moderators https://www.rust-lang.org/governance/teams/moderation. A bunch of them resigned recently due to alleged toxicity in the rust community and governance. https://www.theregister.com/2021/11/23/rust_moderation_team_....
Rust's community structure, and its accountability for its members misbehavior, runs counter to other programming languages like Zig https://kristoff.it/blog/interfacing-with-zig/ which explicitly claims to be decentralized.
This seems like another instance of the above pattern, where "Rust community" is simultaneously:
(1) The set of people who talk about Rust online in major forums, such as Twitter and Reddit, and
(2) The set of people who post on the moderated low-traffic official forum.
I don't think most people, when someone says "Rust community should ...", would consider that to be scoped to people posting on rust-lang.org.
Consider that according to https://users.rust-lang.org/u there are 22,000 registered users on the rust-lang.org forums. There are currently 191,000 people subscribed to /r/rust, and since it's Reddit there's no need to be subscribed to post or comment. The number of people talking about Rust on Twitter is less practical to count, but probably at least the same order of magnitude.
For reference, this is the tweet in it's entirety:
"I agree with this person, along with many Rust community members. Rust is not a "safe language". It's a language that strongly encourages safety. Safety is a spectrum.
The people saying that safety is all or nothing are toxic and Rust community needs to stop turning a blind eye."
Rust still helps ensuring that the "hold my beer" blocks are correct by reducing their scope to a few clearly marked places. This helps focus code reviews and fuzzing. Rust also encourages wrapping of high-risk code in foolproof abstractions, and has universal rules for how tight and robust such abstraction has to be. In a way, Python or Java are also safe abstractions on top of "unsafe" CPython or HotSpot. In Rust this division is just more granular, with the same syntax on both sides.
It's worth remembering that in Rust "safe" refers to Rust's specific guarantees around memory safety and thread safety, but the field of software security is much larger than that. There are lots of possible logic bugs and security issues beyond that, and Rust won't stop you from running `remove_dir_all("/")`.
The big difference is how much regular application developers are forced to go down that path, outside writing drivers or kernel stuff.
Zig should focus its security story in being better than just a Modula-2 (1978) with C inspired syntax.