- Humans write code
- Humans make mistakes ∴ Humans write bad code
Comment on Linux royalty backs adoption of Rust for kernel code
gravitas_deficiency@sh.itjust.works 1 year ago
I’ve gotten into the most hilariously circular debates with rust opponents on this point. Their arguments tend to come down to “just don’t write bad code”.
The team is only as strong as the weakest link. The release is only as good as the least talented dev. Tools that raise the entire foundation are objectively good. Even better are tools that outright prohibit you from even writing entire categories of bugs. Rust is that tool.
And yeah I know it’s not perfect, and it shouldn’t be treated as a panacea. But its advantages should be lauded, not derided because some contributors like to maintain the walled garden of knowledge as if it were a secret spellbook.
tabular@lemmy.world 1 year ago
sundrei@lemmy.sdf.org 1 year ago
But some beautiful day in the future, bad code will write badder code.
catloaf@lemm.ee 1 year ago
And that’s why I don’t work in software development!
Lost_My_Mind@lemmy.world 1 year ago
Their arguments tend to come down to “just don’t write bad code”.
Oooooh, that’s a good stratagy! Write that down! Write that down!
sugar_in_your_tea@sh.itjust.works 1 year ago
I don’t know about you, but I prefer provably correct code over “just trust me bro.”
There’s an analogy I like here. A manager at a trucking company was hiring a new driver, and he asked each of them how close they could get to the edge on a mountain pass. The first said, “I can get within a wheel’s width.” The second said, “I can drive on the edge, with part of the tire hanging off.” And the third said, “I stay as far away as I can.” The third applicant got the job, because why take the risk?
That’s how I feel about C/C++. Why use them if Rust can do the job? You get a lot more safety features without sacrificing performance, what’s not to like?
riodoro1@lemmy.world 1 year ago
Because people already know C/C++.
sugar_in_your_tea@sh.itjust.works 1 year ago
Okay? I know a half dozen languages well, and am pretty productive with a half dozen more. If you’re an experienced software engineer, picking up a new language should be easy. If a language is useful for a given task, I use it. If another language offers benefits I want, I learn it.
It’s like any other profession, why limit yourself to one tool? If a new tool comes out and does the job better, use it.
I love C and it’s my first choice for low level work like microcontrollers. However, it’s not great for larger projects, especially ones with significant security concerns, since subtle vulnerabilities in different areas could be combined to create an attack. Rust provides a lot of protection against common attacks without a performance cost, so it’s a good choice.
riodoro1@lemmy.world 1 year ago
I think they know C a little better than just to be „productive” with it. And also a lot of those people are not so young anymore to learn a new language well enough to feel comfortable with writing a kernel in.
WalnutLum@lemmy.ml 1 year ago
Did somebody say “provably correct”?
Haskell has entered the chat
gravitas_deficiency@sh.itjust.works 1 year ago
That’s kind the entirety of my point: if Rust is a tool that can make expressing algorithms safer and less prone to error - and it can, in a logically provable sense - then what the fuck ground do you have to push back on?
enumerator4829@sh.itjust.works 1 year ago
I’m still kind of on the fence about Rust in the kernel. Linux isn’t some random hobby project, there are serious people working for serious companies in the project. Rust has a clear value proposition w.r.t. it’s qualities as a language, but I don’t think it’s as clear on a system level.
Say I’m working for a large company as a dev, maintaining a subsystem (let’s say a driver). Letting other people (filthy casual hobbyists) mess around with their filthy type safety will eventually spill into my subsystem and cause extra work. I don’t want the extra work, I just want to have my driver working and then go home. And even if I’m okay with the extra work, my boss won’t be. Even the risk of extra costs down the line will be enough for some to shut it down completely.
There are boring people working for huge corporations with huge stakes in the Linux kernel. I don’t think they see that much value in Rust at the moment, and I think the Rust crowd might need to hire some MBAs if they want to expand their presence in the kernel.
gravitas_deficiency@sh.itjust.works 1 year ago
Oh, so that’s actually a thing I specifically do not care about.
I tolerate MBA types at my job because they’re part of an equation that yields a paycheck to me. I don’t believe those MBA types should be in the discussion at this level at all.
In fact, that sort of insistence on implementation details from product and manager types who can’t ever fucking commit to addressing tech debt issues until the system is falling apart is one of the primary frustrations I have in my career.