11 ms·
I really don't understand the hate towards every language that is not Rust. Rust provide you tools to avoid many security issues. But that does not mean everyt
by linkdd 6y ago
I really don't understand the hate towards every language that is not Rust.
Rust provide you tools to avoid many security issues. But that does not mean everything that hasn't been written in Rust is broken by default.
You still have "unsafe" in Rust, so is it broken by default and design and we should throw away the language ? Obviously not!
- rhn_mk1 6y agoThe hate is not towards every language that is Rust, it's against C, at least in this thread. I haven't seen anyone arguing against Python or Java in a Rust thread. Memory-managed languages are already at the memory safety levels comparable to Rust's borrow checker.
- rsa25519 6y ago> it's against C More specifically, I hope, C++. I like to think of asm, C, and Rust as a trio. C isn't "better" than asm; it just doesn't make sense to use asm when C does the job. And it doesn't make sense to use C when Rust does the job. C++ is where, in almost all scenarios, I draw the line and say, this would be probably be better if new code is written in Rust.
- gpm 6y agoIt's generally against both C and C++, because the reason applies to both of them. That reason being that using these languages expose users and the world to huge negative externalities in the form of security vulnerabilities, or alternatively (but resulting in the same conclusion) that the speaker just likes writing correct code. > And it doesn't make sense to use C when Rust does the job. There are few jobs left where C can do it and Rust can't, those jobs are generally "well there exists a C compiler for this architecture and not a rust/llvm backend". Rust is generally just as capable as C is at writing low level code. If you're willing to put up with translating macros by hand (or using wrapper functions), it's even capable of integrating with existing C code bases. Lots of people still prefer C over Rust in various situations where you could use Rust, so I don't think it's a generally accepted fact that "it doesn't make sense to use C when Rust does the job".
- rsa25519 6y agoAgreed. Very well put, thank you.
- phoe-krk 6y agoAs a Lisp programmer, I don't dunk on everything that is not Rust; I instead dunk on everything that is C. The extensive use of this language has brought us countless pain via stack overflows, buffer overflows, memory corruption, and multiple other vulnerabilities that are literally baked into the language model. Dropping C for any sane alternative will be a massive boon.
- jayp1418 6y agoI think ada can be good contender for C replacement
- MaxBarraclough 6y agoI think Ada's future is in safety-critical systems, where it makes sense to invest heavily in correctness, with the option of using SPARK and formal verification. Additionally, Ada has several mature compilers suitable for life-and-death applications. For more ordinary software though, doesn't Rust make more sense? Its approach to memory management for instance, with a borrower-checker, seems much nicer than what Ada has to offer. Disclaimer: I know neither language very well.
- imtringued 6y agoYou need something with traction. How are you going to rally people to use ada? Where is the ada version of Gitoxide?
- MaxBarraclough 6y ago> You need something with traction No language has traction, until it does. It would be fair to point out though that Ada has had decades to catch on and replace C, but it hasn't done so, except in certain narrow areas of highly critical embedded software development in aviation and military applications. My understanding is that it's not easy to work with for 'general purpose' work (command-line applications on GNU/Linux), as it lacks mature bindings. I think it's fair to say Ada failed to truly embrace Free and Open Source software. A pity, in my opinion.
- csdreamer7 6y agoAs others have said, the issue is with C style memory issues. Rust not only gives you safety and correctness, but gives you often speed as a bonus over C. There is a real benefit towards rewriting everything written in C in a language/tool system like Rust. There is still a place for other languages, especially ones that use a garbage collector. Rust would make that garbage collector a lot safer.
- assap_cocky 6y agoThere is no conclusive proof that Rust is faster than C. There are many Medium articles using badly written tests, which don't accurately show either of the languages. Rewriting all software written in C-family languages would be a disaster. This is the exact thing that people make fun of the Rust Evangelism Strike Force for saying. C is here to stay, and Rust is as well. Many new applications will be written in Rust (not a lot because nobody cares about Rust outside the dweebs on HN), and many will be written in C. Calm down.
- anshdgTHa 6y agoSince the top subthread comment has been predictably flagged by the clique: Rewriting is easier than doing original work. If you manage to get people to use "your" new Rust project, you get a huge payoff for comparatively little work with lots of plagiarizing.
- oblio 6y agoSomeone should have told Linus to stop plagiarizing. Heck, someone should have told Stallman and GNU, too. Your argument is quite flawed.
- linkdd 6y agoI just think there is more crucial project to rewrite than git, vim, etc... At this point, it's just falling for the hype. The same thing happenned with go, es6, etc... "X is better than Y because it is written in Z" is not a valid argument. A kernel in Rust? Yes please. A browser in rust? Can't wait. A fork of openssl in rust? Yes yes yes. A cli tool? Why? Is it really necessary? And yes it is a genuine question, not some random rant.
- deleted 6y ago[deleted]
- Kaze404 6y agoI don't think every project has to be a crucial endeavor or a new thing. Let people do things for fun. > A fork of openssl in rust? Yes yes yes. https://github.com/ctz/rustls https://github.com/ctz/rustls
- amelius 6y agoI think garbage collected languages like Haskell actually provide better security than Rust, because the code is not littered with constructs dealing with memory management. The only reason to use Rust is if you need the performance. But often, that's only an issue in your "inner loops", so you could write the rest of your code in a more suitable language. Since in most cases these performance critical parts are only small in terms of lines of code, and hence easily verifiable by hand, you could even write them in C and still not have security issues. Therefore, I think Rust serves only a very specific need, and isn't nearly as universally "the right tool" as everyone seems to believe. They do have a nice packaging system, though.
- roca 6y agoFor applications like Web browsers the "inner loops" approach to optimization isn't nearly enough. Execution of important benchmarks smears out over huge amounts of code. If executing straight-line code in your favourite language is just a bit slower than C++, or touches more memory than C++, it's a losing proposition.