9 ms·
Rust is Software's Salvation
- pklausler 10y agoRust has great potential to be a better tool for C and C++'s niches, and we're all rooting for it, but for those tasks where a type-safe GC'd pure functional language can be used, well, they still should be.
- copperx 10y agoHow fast we forget Brooks. There is no silver bullet.
- ZenoArrow 10y agoSure, but not all languages are equally bad. Will Rust become dominant? Unlikely. Will Rust's popularity continue to grow? For the foreseeable future, I'd say yes, mostly based on its merits.
- rl3 10y ago>There is no silver bullet. There could be though. Maybe the successor language to both Rust v4.4 and C++26 will be named Silver Bullet. You never know.
- rl3 10y ago>Better performance than C That's a bold, yet generalized statement.
- falcolas 10y agoAnd, from most indications, incorrect. I think it's beat one C program on Alloth's benchmark game in processing time, but has been beat in the others. It performs on par with C++, on the other hand, for what that's worth.
- colemickens 10y agoInteresting reading in this area in case anyone missed it: https://news.ycombinator.com/item?id=13268051 https://news.ycombinator.com/item?id=13268051
- steveklabnik 10y agoRemember that the benchmark game is a game, and it has rules. https://news.ycombinator.com/item?id=13267312 https://news.ycombinator.com/item?id=13267312 is a recent thread about Rust and these rules on at least one benchmark. Many of the others boil down to "explicit SIMD isn't in stable yet."
- quotemstr 10y agoThe Java people made the same bold claims back in the day.
- falcolas 10y agoThe best defense is a good offense. What is scaring all of the Rust developers and users so badly that they feel the need to go on such an offensive hype campaign? It's worse than the phase Java went through when it hit its peak. I'll be honest. Until we start seeing some more balanced (frankly, I'd settle for nuanced) discussion about the compromises made to get Rust's strengths, I'm staying the hell away from it.
- cbrewster 10y agoNot sure why marketing Rust implies that the community is trying to defend it. Honestly, I enjoy sharing with my experience with Rust because I personally enjoy writing in code with Rust and want to share that with others! Nobody is saying Rust is perfect or doesn't have tradeoffs.
- falcolas 10y ago> Nobody is saying Rust is perfect Err, the title of this article is "Rust is Software's Salvation". The previous one was "Rust is mostly safety". No discussion of trade offs, no negatives to be found. From the original article: "[Rust is] Technology from the past come to save the future from itself" > Not sure why marketing Rust implies that the community is trying to defend it The original article was a call for marketing material, because they don't feel enough people are using it. Those people are, to paraphrase the sentiment from the comments in the first article, wrong for thinking they write safe C or C++ code.
- verletx64 10y agoHang on. The original article that kicked off the 'Rust is mostly safety' article was a call for a change in the marketing material[1], away from the 'Rust is safe' narrative. It's not an attractive narrative (IMO) and the point that Klabnik was making was that Rust is more than 'just' safety. 'Rust is mostly Safety' was written in a sense disagreeing (depends on your interpretation) with Klabnik's article that Rust is much more than safety. Now, yes, these posts (namely the 'Rust is more than safety' and 'Rust is mostly safety' are not discussing the negatives of rust, absolutely, but it's not the scope of the posts to do so, it's not what that particular discussion is about and they should be exempted from this broad brush. You've taken a quote from the Klabnik post, which is itself quoted from an initial release announcement, which is basically guaranteed to be a spot of marketing. As always, there is a time and a place for the discussion of trade offs and negatives. A release announcement is not the place for this. Nor is a discussion of changing the tone of the marketing of the language. Now, finally turning my attention to the article in the post...well, that strikes me as a place to discuss some negatives. I am not super comfortable with basically listing all the cons of C and well, not even discussing the pros of Rust but presenting it as a panacea. I think it doesn't quite hit the point of Klabnik's article which to me was more about stopping marketing based on what Rust stops you from doing and marketing Rust more on what it lets you do. [1] http://words.steveklabnik.com/rust-is-more-than-safety http://words.steveklabnik.com/rust-is-more-than-safety
- rubiquity 10y agoThe amount of hype Rust is getting is not going to end well for Rust. This reminds me of Ruby during 2007-2010 where it went from Patron Saint to Scapegoat for every startup that failed using it. Ruby survived it, and I'm sure Rust will too, but that doesn't make it obnoxious for everyone else who inevitably gets swept up in the craze and crash. Programming is hard. Programming will always be hard. Better/newer tools (and sometimes influences from the old finally making it mainstream, like Standard ML) make programming easier but not fool proof. It's misleading and harmful to hype the crap out of any language. Unfortunately this stupidity is never going to end as long as language creators measure language success in adoption numbers and TIOBE scores rather than the warm fuzzy feeling of handling certain people's needs really, really well.
- w8rbt 10y agoI agree. C is fast because it can be unsafe. Skip all the safety checks and run like hell (if you need or want to). We don't care what size that array is, we just want to go really fast. Safety checks come with a performance cost. Rust claims to be faster than C and safer than C at the same time. That's not possible.
- jdright 10y agoAnd it is not. It is not faster than C but it can be almost as fast someday.
- w8rbt 10y agoThe rust zealots say it is, "Better performance than C" That's from the linked article 'Rust is Software's Salvation' (bullet point 3).
- averell 10y agoThat is very much possible in many cases. Zero cost abstractions exist: https://blog.rust-lang.org/2015/05/11/traits.html https://blog.rust-lang.org/2015/05/11/traits.html
- 10y ago
- Asdfbla 10y agoI expect the rebuttal "Rust is Software's Doom" soon.
- trav4225 10y agoor "10 Reasons Why Everything You Know About Rust Is Wrong"... ;)
- korethr 10y agoI'm waiting for when an earnest "Rust Considered Harmful", or perhaps a "Falsehoods Programmers Believe about Rust" shows up.
- stcredzero 10y agoHow Rust guarantees referential safety with One Weird Trick.
- stcredzero 10y agoHow about Rust is Software's "Doom Soon?" http://www.anthropic-principle.com/?q=anthropic_principle/doomsday_argument http://www.anthropic-principle.com/?q=anthropic_principle/do...
- qwertyuiop924 10y agoThat's a lot of hype. I don't hate C, like some here, but I am receptive to the many objections to it: it makes a lot of sense. But I would be a lot more receptive to this particular attack on C (which is pretty reasonable) if it wasn't so melodramatic: claiming that Rust will "save software" and that C is some kind of garbage with no advantages of any sort. Both are false (although the latter has some truth to it: C has many issues). The truth is strongly in your favour: No need to stretch it.
- hubert123 10y agoRust is an overly complicated language that made the exact same deadly mistakes that c++ made: takes too long to compile and is too complex. Yes I get it, you're working on the compile times. You will never bring them down to under 1 second regardless of amount of libraries used, let's just say this once and for all. I add two crates 'hyper' and 'postgres-rs' in a 500 line(!!!) program and it's STILL a 2.8 second compile time. Imagine if I actually use Rust for real software and have 500k lines of code. I'm putting my hopes on Jonathan Blow's Jai language.
- qznc 10y agoI don't know why you are down voted. Compile time is a Rust issue for me. I'm spoiled by D. However I'm not sure if borrow checking is inherently slow. The release notes are discouraging. 30% faster? Aim for 10 times faster. Maybe it is just the LLVM backend. It still is slow.
- steveklabnik 10y ago> Aim for 10 times faster. What you aim for and what you achieve are different things. These things take time. We've been getting faster every release. 10x faster within a single six-week period is not realistic. (Borrow checking is not generally the slowest part; it's the codegen. Which is LLVM. But also is the IR we feed to LLVM.)
- hubert123 10y agoD is not fast enough either, I only like Java (with the eclipse compiler), Golang and obviously the dynamic languages
- qznc 10y agoGo is fast. D is fast, but its compile time meta programming features can make it arbitrarily slow. Java, Python, etc actually compile at run time so the comparison is invalid. You can measure the full iteration speed, but then image based wins (Smalltalk, Common Lisp).
- kevlar1818 10y ago> A world where complete system crashes in software are as rare as car crashes A hilariously wrong/misleading analogy in an otherwise compelling and agreeable blog post.
- youdontknowtho 10y agoCaptain Obvious here with a public service announcement: Rust's safety guarantees dont extend to logic or protocol implementation problems or misconfigured security settings.the part of the article about service providers leaking creds or other info...Rust all the things and that will still happen. Some of this stuff is just too much. Also, why not work on lifetime and memory safety in a c based language? Rust looks like Klingon to me. functional-ish-ness is really hot right now. (Like Hansel.) There's this really sophomoric theme that this seems to be a part of that keeps resurfacing here. its almost like a conspiracy of influences made the wrong tech choice in the past and everything would be ok now if we used X. Where X could be haskell, rust, os2, plan 9, lisp, lisp, lisp, go...theres quite a few saviors out there they resurface every now and again.
- jeffnotjeff 10y agodont forget microkernels.
- Ar-Curunir 10y agoThere are ways to prevent some logic/protocol problems at the type level using rust: https://hoverbear.org/2016/10/12/rust-state-machine-pattern/ https://hoverbear.org/2016/10/12/rust-state-machine-pattern/ https://blog.tarn-vedra.de/posts/phantom-types-for-safe-apis.html https://blog.tarn-vedra.de/posts/phantom-types-for-safe-apis... https://insanitybit.github.io/2016/05/30/beyond-memory-safety-with-types https://insanitybit.github.io/2016/05/30/beyond-memory-safet... https://scribbles.pascalhertleif.de/elegant-apis-in-rust.html#session-types https://scribbles.pascalhertleif.de/elegant-apis-in-rust.htm... Some libraries use such features to prevent certain kinds of nonce-reuse during encryption (one of the more common ways of screwing up encryption). These constraints are checked at compile-time. Such guarantees are not possible with weaker type systems like that of C.
- youdontknowtho 10y agoI get what you are saying. "Software's Salvation" might require more than compile time type checking. I'm a huge strong typing fan! I'm just saying, type systems can get you a long way toward correct construction. (Or correctness by construction...) The issues with the software/computing world are bigger than array bounds checking and type correctness.
- mlvljr 10y agoAGAIN??
- Thaxll 10y agoThe reality is Rust will never be mainstream because 95% of the dev use php / ruby / python / java / c# and Rust is far too complicated to switch from those. That's where imo Go will prevail, it's a simpler language that is easy to use / learn.
- steveklabnik 10y agoWe have a lot of Ruby/Python/JavaScript developers using Rust. They handle it just fine.
- senko 10y agoAre they really the target audience, though? Do they need it? To an outside observer (me), seems like Rust evangelicism tries to cast a too wide net, ending in "meh" response from many.
- steveklabnik 10y agoWho are you to say what someone needs or doesn't need? In this specific case, as projects scale, extra performance is important. So they've started deploying Rust services to address that need. Like this post: https://blog.sentry.io/2016/10/19/fixing-python-performance-with-rust.html https://blog.sentry.io/2016/10/19/fixing-python-performance-... Look at that CPU graph. That's actual, important, business value. > ending in "meh" response from many. Most of this thread is complaining about people having a _too enthusiastic_ response to Rust, not too little.
- senko 10y agoI didn't say Rust has no practical value, nor did I say what someone needs. I commented on the fact that saying Rust is for everyone you're watering down your marketing message.
- rokosbasilisk 10y agoyea, one of the reasons python gained traction was it being used in alot of cs101 classes. I wouldnt use rust, but I have used go just to learn
- Taniwha 10y agoAll of us who get the compiler writing bug make a toy language or two, I know I did, way more than two, usually it was taking some great idea and running with it .... there is a basic problem that there's a lot more aspiring compiler writers than there is public mindshare for learning new languages .... for every new language you see blooming there's 20 that didn't get the attention to get more than 2 adherents, and for every adopted language being commonly used there's another 10 of those new blooming languages that will blaze and die .... only to have its one great idea find its way into C++ 5 years from now. I don't write new languages any more, I figured this out 20 years ago, it's something that is very very hard to suceed at, and rather a crap shoot. The same goes for OSs. Oh, and BTW, functional languages, the very best thing since sliced bread, for, what? the third time around now?
- jstewartmobile 10y agoThis may be wishful thinking, but to echo Alan Kay, I have been hoping that with the stalling of Moore's law we'd start being a little more thoughtful about the instruction set architecture (like the B5000) so that we can do safe and performant things in higher-level languages. I like Rust. I just don't think doing things in a better C than C is going to yield as much of a payoff as these guys think it will.
- stcredzero 10y agoI think they're right, security wise.
- jstewartmobile 10y agoI remember doing all sorts of "clever" arcane things to get a smooth high frame rate for a program on my old IBM PC. Next generation, they have actual graphics cards with overlays, easy vsync, and double-buffering where the buffers can be swapped with a simple toggle instead of trying to find some way to shuffle the bytes faster. I was able to replace pages of "cleverness" with a few lines of code in the same language. These guys are very impressed with their improved hammer. It might not be the best tool for the job.
- vatotemking 10y agoEven Rust folks disagree with the title of the post: https://www.reddit.com/r/rust/comments/5kytg5/rust_is_softwares_salvation/ https://www.reddit.com/r/rust/comments/5kytg5/rust_is_softwa...
- AnimalMuppet 10y ago> Better concurrency than C++ That's... not saying all that much. > Better performance than C In 2014? Objection, your honor. Assumes facts not in evidence. About problems with C: > Maybe a bug in GCC outputted the wrong machine code And Rust compilers will never have bugs? > Maybe a race condition in Linux gave an unprivileged process the ability to tamper with your program And writing your program in Rust is going to save you? Nope. Now, in the previous two points, the claim may be that GCC/Linux is written in C, rather than that my program is written in C. But a compiler written in Rust can still output the wrong machine code, and the borrow checker won't save you.
- Dowwie 10y ago"better documentation than Python" -- those are fighting words!
- kazinator 10y ago> Problems with C: > [ ... ] > Maybe a bug in GCC outputted [sic] the wrong machine code How does Rust protect against a bug in Rust outputting the wrong machine code? > Maybe a race condition in Linux gave an unprivileged process the ability to tamper with your program Too bad the race-condition free Rust OS that can replace Linux isn't here yet.
- colemickens 10y agoIt's no Linux replacement, but Redox OS blows my mind with the functionality they have so far already.
- 101023810 10y agoThis is a very strange statement. I bet that the compiler can't prove "within-array-bounds" for about 99% of the algorithms in CLRS, but those algorithms are well-written (and have proofs themselves). None of this matters of course: The hipsters (at least publicly) have taken over Rust and are ruining it for everyone. EDIT: Downvoting by an idiot hipster within seconds.
- coldtea 10y agoYou don't have to "solve the halting problem" to have better heuristics/primitives than C that give a compiler more optimization room. Even Fortran does it, and of course there's tons of room for way bigger "intention defining" features in a language than what Fortran offers. So nothing strange about the statement, except your hyperbole.
- 012810010101 10y agoOf course the "halting problem" was hyperbole. It was in the context of "rust is salvation" and the flood of blog posts showing up here in the last 24 hours. But valid access proofs for nontrivial programs are hard, so the real benefit (this subthread was originally about the cost of bounds checking, specifically compared to C) remains to be seen. [The topic of this subthread is difficult to see, since the starter comment has been (quite ridiculously) downvoted into oblivion.]
- dang 10y agoWe've banned this account for trolling. Please don't create accounts to break HN's guidelines with. We detached this subthread from https://news.ycombinator.com/item?id=13282028 https://news.ycombinator.com/item?id=13282028 and marked it off-topic.
- mSparks 10y agoplease take your life somewhere else.