4 ms·
There are times when the right algorithm dominates, and you end up using something written in a language that doesn't fit your expertise/deployment system/prefe
by zellyn 3y ago
There are times when the right algorithm dominates, and you end up using something written in a language that doesn't fit your expertise/deployment system/preferences/etc. because it's the only thing that implements a particular thing well. There are a lot of great tools like Redpanda (C++) where there isn't a memory-safe alternative filling the same niche.
But as a professional programmer for 25 years now, I'd say the fraction of our job that boils down to finding, designing, or implementing the right algorithm is sadly tiny. It's all the messy details that end up soaking our time and attention. One way to increase the amount that algorithms matter is to work at greater scale, which is basically why I moved from "programming at some corporation that does something else" to Silicon Valley technology companies.
The other important detail is that different languages allow for very different kinds of refactoring. I've found the Oxide and Friends podcast to be possibly the most powerful vote of confidence in Rust that I've ever seen in this regard. In their most recent episode -- https://oxide.computer/podcasts/oxide-and-friends/1734108 https://oxide.computer/podcasts/oxide-and-friends/1734108 -- they discuss how Rust allowed them to make sweeping and rapid structural changes to their storage code that they wished they could have been able to do in the underlying layer -- ZFS. (This from folks who helped create ZFS or were at least adjacent.)
If your language allows you to make sweeping refactors safely, it enables you to mutate your code towards better algorithms for the task.
Also, it can give you more time to focus on the algorithms. If I, a novice C++ programmer, allowed to actually use C++ in anger, I'd spend all my time trying to figure out memory safety and ownership problems, not focus on the algorithms. I'm simply not willing to put in the multiple years of hard work it would take to be able to program C++ safely. But I'd be willing to let myself, a novice Rust programmer, use Rust. It might not be pretty, and the borrow checker and I might come to blows, but it wouldn't be dangerous.
(fwiw, I'm really a Go programmer. But I've lurked many programming languages and their communities during their early phases (Go, Rust, Zig, Roc, Perl6), and it's hard to argue that Rust is _really_ good at certain things.)