RSLABBERT.COM

Absolute vs Relative values

2021-05-12

A recent HN Post discussed the idea of Zig's approach to safety, especially in comparison to Rust. While it is true that Rust is a "safer" language than Zig, I think there's a lot of nuance that gets lost due to the nature of absolutes.

The first point here is that all projects/teams/etc. make use of a certain set of values, whether they acknowledge it at all. Values by nature are also relative. For a certain feature, one value might win out over another. For example, Rust values safety and compatibility, which is why unsafe exists.

Secondly, some projects also choose to treat a specific value as overwhelmingly important. I call these absolute values. That's not to say that the value will always win out (reductively: the most secure language is one that doesn't let you write code), but that it will overwhelmingly be used to justify decisions. Again, projects like Rust and OpenBSD value security as an absolute value, as it guides decisions that affect large parts of the projects.

Thirdly, for various reasons, nuance gets lost in general discussion. Something like "Rust will overwhelmingly value safety over other values, but not exclusively" get reduced to "Rust is a safe language". This isn't a bad thing as such but can lead to issues such as the following: Rust is a safe language, Rust is safer than Zig, thus Zig is not a safe language. This is frequently not even a conscious decision. When I'm looking at two CLI tools to accomplish a specific task, I will most likely favour a Rust version over a C version, because my monkey brain reduces the decision to "robust and safe vs fast and loose".

The conclusion to take from this, in my opinion, is that we need to consistently challenge ourselves to fully consider what a project is actually trying to do, as opposed to what we think it's trying to do at a glance. If we critically examine a project's values, and especially when one wins over another, we can have a much better understanding of what it actually means to compare languages.

Additionally, if you're a project maintainer, I'd highly recommend having a robust understanding of the values for your project and making that clear upfront. This will not only help developers on the project make more informed decisions, but it will also drive a deeper understanding of your project in the broader discussion sphere.