8 ms·
Might be useful to recall that Rust's 1.0 release was in 2015. It may be a little premature to reimplement parts of Linux in such a young language... Rust may b
by bjourne 6y ago
Might be useful to recall that Rust's 1.0 release was in 2015. It may be a little premature to reimplement parts of Linux in such a young language... Rust may be a fad and may not catch on. I have used it a bit and I don't think it offers many significant benefits over C++.
(The Rust brigade is out in force I see :))
- andrew_v4 6y agoI think there is a big ideological element to this. As a Rust outsider, I feel like it's the computer science embodiment of the current political discourse. There is something about the "one true cause" mentality, and the need to co-opt projects with other goals and steer them towards the cause. Honestly, it is a really weird experience to have around a programming language, and to me is offputting for something that otherwise could have some very interesting merits. I expect people wont agree with me, and I'm not arguing against the technical merits of the language, I'm just saying that it stands out because of the ideological following it has, and that is cause for concern if ideology is a big reason people try and push to integrate it in something as important as linux.
- roca 6y agoSome of us are mentally scarred from decades of dealing with weak type systems, undefined behavior, and general inability to be sure of what's going on in gargantuan C++ codebases. Rust was more or less specifically designed to appeal to people like us. Throw a rope to a drowning person and they'll grab onto it hard.
- otabdeveloper4 6y agoRust won't make legacy code and legacy coders go away. In fact, as time goes on the amount of crappy legacy Rust code and low-skilled legacy Rust coders will only grow. So Rust is not a solution.
- nicoburns 6y ago> In fact, as time goes on the amount of crappy legacy Rust code and low-skilled legacy Rust coders will only grow But it will make those codebases a lot easier to deal with because the Rust compiler enforces correctness in a myriad of ways that other languages don't. I would much, much rather deal with a legacy Rust codebase than a legacy C++ one.
- otabdeveloper4 6y agoThis isn't true. Or, rather, there are also a myriad of ways that C++ enforces correctness that Rust doesn't. Legacy codebases are smelly not because of a lack of tools for enforcing correctness. They're smelly because a) programming is hard, and b) a boatload of things are more important than correctness, in the real world. > I would much, much rather deal with a legacy Rust codebase than a legacy C++ Obviously, because right now legacy Rust codebases are only 5 years old, while legacy C++ codebases are 30+ years old. But in 20 years it will make no difference. The Rust of 2031 that will need to accommodate 30 years of legacy backwards compatibility will be no prettier than C++ today.
- nicoburns 6y ago> there are also a myriad of ways that C++ enforces correctness that Rust doesn't. There are? Like what? > But in 20 years it will make no difference. The Rust of 2031 that will need to accommodate 30 years of legacy backwards compatibility will be no prettier than C++ today. I don't really believe this. There are 20 year old Java codebases, and yes they can be a mess and hell to work with, but they're not nearl as bad as C++ ones. And Rust is stricter than Java.
- otabdeveloper4 6y ago> There are? Like what? Exceptions, for example. > There are 20 year old Java codebases, and yes they can be a mess and hell to work with, but they're not nearl as bad as C++ ones. That's because Java doesn't attempt to solve difficult problems.
- techdragon 6y agoIs it an ideology or is it just a growing consensus that Rust is really as good as everyone says it is? While I can see how it might look ideological, it doesn’t “feel” ideological to me at least. It feels like a few years ago we hit critical mass and crossed the point where enough people feel like Rust is never going away, that people began to really rely on it, and once they showed this work to other people those people liked what they saw and decided to give it a try and Rust is growing organically on the back of “doing the right things” and just generally being “a good language” for so many more things than people are used to.
- ansible 6y agoYep. I think Bryan Cantrill's talk from 2018 encapsulates things pretty well: https://www.youtube.com/watch?v=LjFM8vw3pbU https://www.youtube.com/watch?v=LjFM8vw3pbU Bryan is a hardcore C guy, and can write safe and reliable C code. But he has reached the limits of what C can offer in terms of composability and abstraction. Like Linus, he wants and needs the kind of high performance and dependable behavior for systems programming that isn't possible with a garbage-collected language.
- ssokolow 6y agoHe also wrote a couple of blog posts called "Falling in love with Rust" and "Rust after the honeymoon": http://dtrace.org/blogs/bmc/2018/09/18/falling-in-love-with-rust/ http://dtrace.org/blogs/bmc/2018/09/18/falling-in-love-with-... http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeymoon/ http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeym...
- selfhoster11 6y agoThis is exactly my perception too.
- saemei 6y agoSometimes ideologies actually point in the right direction. The hard part is to recognize the gems amid the firehose of truly bad ones. FWIW, I think the memory safety-first ideology of Rust is worth spreading.
- bjourne 6y agoAgreed. Which is why I prefer garbage collected languages. Rustaceans, however, harbor an irrational fear of garbage collection pauses, hence "memory safety-first ideology" built on garbage collection is heresy. The one true path to memory safety nirvana is through the holy borrows checker. :)
- mlindner 6y agoWell the set of all programs where garbage collectors can be used is smaller than the set of all programs where manual memory management can be used (either done by the compiler or manually by the programmer). This doesn't counter your point completely, but it bears thinking about.
- saemei 6y agoRust' memory safety feature includes "fearless concurrency". Popular GC languages like Java or Go are not able to prevent a class of data race bugs that Rust prevents at compile time. Languages like Haskell of course handle it much better, but are for a multitude of reasons not popularly used in production. And as the sibling comment points out, GC languages are not applicable everywhere. This discussion is in the context of the first not-C language being added to the Linux kernel. Can you imagine a GC language being similarly considered? So yes, the borrow checker is amazing. That feeling of satisfaction and confidence when the program finally compiles after a round of serious coding or refactoring is unparalleled among the mainstream languages I've tried so far.
- bjourne 6y ago> Rust' memory safety feature includes "fearless concurrency". Can you give me an example?
- grayhatter 6y agoNever dislike anything popular on HN.
- arbitrage 6y agoYou just need to not be a confrontational jerk about it, honestly.
- grayhatter 6y agoI've complained about apple, barely. vscode, because I hate electron. And rust, because reasons. I wasn't confrontational, or a jerk. Only expressing mild disappoinment or dislike. All of them negative vote comments. Have you ever seen a comment complaining something popular is bad, or the commenter doesn't like it with a positive count?
- int_19h 6y agoWhen a company like Microsoft is writing production code in Rust, I think it's fair to say that the language has passed the "fad" stage. https://thenewstack.io/microsoft-rust-is-the-industrys-best-chance-at-safe-systems-programming/ https://thenewstack.io/microsoft-rust-is-the-industrys-best-... https://medium.com/the-innovation/how-microsoft-is-adopting-rust-e0f8816566ba https://medium.com/the-innovation/how-microsoft-is-adopting-... https://www.infoworld.com/article/3605551/microsoft-forms-rust-language-team.html https://www.infoworld.com/article/3605551/microsoft-forms-ru... https://docs.microsoft.com/en-us/windows/dev-environment/rust/overview https://docs.microsoft.com/en-us/windows/dev-environment/rus...
- junon 6y agoAh yes because Microsoft is a beacon of good software design.
- int_19h 6y agoThe question wasn't whether Rust is good or not, but rather whether it's entrenched enough to not be considered a mere fad anymore. Regardless of your opinion on the merits of Microsoft products or their development process, the point is that it's one of the largest software development companies, and - as enterprises tend to be - is more conservative in terms of technological stacks used for production code.
- junon 6y agoAnd? Companies use immature technology all the time, for better or for worse. Why does a few microsoft employees using Rust have any effect on its maturity?
- otabdeveloper4 6y ago"A company like Microsoft" writes production code in literally every language. The stakes are low and nobody cares if your little team writes code targeting a Brainfuck compiler. (Yes, this is a real thing; there's a Brainfuck compiler developed somewhere in the vast guts of Google. No, I don't have a link to share with you, sorry.)