Live data from Hacker News

Ask HN: Will Rust ever become a mainstream systems programming language?

news.ycombinator.com

211–220 of 291 posts

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#211
post #148

Earlier quoted context omitted.

Rust has benefits for writing and maintaining correct code, sure. But your claim here is absolutely absurd. Rust is quite difficult to learn- anecdotally, empirically, and by nature. Being dishonest about Rust is not going to help anyone no matter how good it is.

It's entirely dishonest and ignorant to simply discredit and dismiss someone's point of view because you have it set in your mind to not believe a point of view that isn't your own. My history with Rust is proof alone that there is more to the story than you claim. I'm not the only one that has no difficulty with Rust either. It is all a matter of mindset, and so if you think it is hard, then it will be hard. However…

It is all a matter of mindset, but you are blindly ignoring the fact that it takes effort to learn a new mindset. Maybe it went smoothly for you and that's fine (though I suspect you're just not remembering it, perhaps willfully). In fact it went relatively smoothly for me as well.

The point is claiming it's easy dismisses the very real obstacles that exist for others, and does worse than nothing at convincing people to try Rust. So I second dbaupp's sibling comment here- your comments embody the aspect of the Rust community that turns people away.

Please, just slow down in your advocacy. It's not helping.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#212
post #146

Earlier quoted context omitted.

You have no data at all to back this up. The vulnerabilities you speak of are, far more often than not, written in old-style C and C++. That doesn't make Rust a bad idea, but it does mean your claim is completely unsubstantiated. Advocating for Rust by lying is not going to help anyone.

This is the same line of logic and statements repeated by C and C++ programmers that shortly thereafter get showed up with a list of CVEs in their 'modern C/C++' projects. Remember the recent Curl developer PR disaster?

Yes, it's the same line of logic because it's correct.

The claim that Rust's memory safety is sound while C++'s is not is... not really the question. The question is whether that matters in practice. C++ has certainly improved in making certain mistakes easier to avoid.

Now, I come down on the Rust side for many situations, but making unsubstantiated claims about your language of choice is exactly the problem people had with the Curl blog post. Please stop making them about Rust.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#213

Earlier quoted context omitted.

> No just sandbox the code inside a try catch... This works fine if it's just a matter of rolling back a database transaction or releasing file handles (b/c someone else is doing all the work for you). But if you have more complicated invariants, your try catch has to handle restoring those invariants, no matter what path your code took.

I'd recommend taking a look at Common Lisps condition system, which does exceptions right. The most important feature is that catch blocks are executed before the stack is unwond, providing the ability for a handler to signal back to the context where the error occurred how it should be handled. It's sad that no other languages implement this and instead simply decide that exceptions are bad.

Fun trivia: Rust had conditions! Nobody used them, so they were removed.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#214

Earlier quoted context omitted.

For point one, it helps that Rust is one of the easiest languages I have ever worked with to install the compiler run-time, pull dependencies, build, run, and distribute. So at the very least, it won't get in your way if you just want to distribute a static binary, or give your users a few commands to compile it themselves, even if it is "some weird language". On point two, Rust is not a moving target, in the sense t…

Unfortunately Rust uses an LLVM fork IIRC, so using it is non-trivial.

We can use (and have tests to ensure that it works) a stock LLVM as well.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#215

Earlier quoted context omitted.

Just curious, have you ever used any other modern languages that do not use exceptions for error handling? Most people who complain are just used to the exception way, but once you embrace returning errors out of functions, it really does feel like a massive improvement in terms of the paradigm.

I work on several languages professionally being the only one without exceptions Go and I don't see how its idiotic pattern of checking the value returned after every single call is a massive improvement on anything except masochism.

I dislike Go's error handling too. Rust solved this neatly with question mark operator (previously implemented as try!() macro).

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#216
post #150

Earlier quoted context omitted.

If rust ever gets to the point where it's not much harder to write than java/c# then why not got for the fastest one and avoid performance death by a thousand cuts? A millisecond here and there can add up. And then there's the environmental cost of slower code. How many tonnes of CO2 emissions are higher level languages responsible for daily?

> If rust ever gets to the point where it's not much harder to write than java/c# then why not got for the fastest one and avoid performance death by a thousand cuts? Sure. If it's just as easy for the task then why not? But I wouldn't recommend Rust for web development for the same reason I wouldn't recommend C++ for web dev: complexity. Obviously, this is entirely subjective but I don't think either language will e…

I'm not saying this makes Rust as easy as Java or C#, but I don't think `Rc`/`RefCell` types are the cause, nor for that matter the solution to the cause.

Idiomatic Rust makes single-threaded interior mutability very, very rare. I don't remember ever once encountering the dilemma of "Vec> vs RefCell>", in my own code or elsewhere.

In fact, my current project (https://github.com/team-worm/spice) involves an HTTP server written in Rust. Like you suggest, managing state across requests was one of the harder parts (both for myself to work out fully and for a team member who started with no Rust experience to grasp).

However, much of that difficulty was intrinsic to the problem- the HTTP library we use is multithreaded, so for correctness we have to synchronize access to the state. Instead of discovering this by way of race conditions or hard-earned experience, Rust enforces it for us. Team members who have never used Rust before can be trusted to go in and work on the server without worrying about causing subtle concurrency bugs. They hit the brick wall of error messages instead.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#217

Earlier quoted context omitted.

Are there any AAA game studios using or evaluating Rust yet? I saw some GDC talks about the multithreaded game engine for Bungie's Destiny game. Given the debugging and QA challenges of their multithreaded architecture, something like Rust's ownership model seems like a good fit. Does the Rust toolchain support Xbox and PlayStation? * Destiny's Multithreaded Rendering Architecture: https://www.youtube.com/watch?v=0nT…

DICE is using it internally. The only reason why they aren't using it in games is because Rust won't compile on console platforms.

[deleted]

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#218

Earlier quoted context omitted.

DICE is using it internally. The only reason why they aren't using it in games is because Rust won't compile on console platforms.

Oh? I hadn't heard of this before! I wonder if we can fix that...

Rust can totally compile on console platforms- it's been done, e.g. on PS4 (https://twitter.com/wickerwaka/status/479842553831776257), as I'm sure you've seen, Steve :)

The problem (speaking as someone working on a console game at a AAA studio) is more likely that it's not officially supported. Console SDKs include C++ toolchains and C++ libraries, and there's a lot to lose by trying to bypass that, especially on a game project schedule.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#219

I think it's important to consider the implications if Rust doesn't become a mainstream programming language. I'm not shy about my dislike of Rust. I like C, I don't think avoiding buffer overflows and memory errors is that hard, and I chafe at the idea of a language I dislike aesthetically taking over systems programming. But even I have to admit the arguments for using C instead of Rust are niche. Sure there's prob…

> It doesn't use segmented stacks so it doesn't achieve the M:N performance of Go

Actually, if you use Tokio or similar approach, you achieve better performance than Go (no need to re-allocate stacks) while code is still quite readable and boilerplate-free.

Re: Ask HN: Will Rust ever become a mainstream systems programming language?

#220
post #6

Earlier quoted context omitted.

Also anyone big besides mozilla, who created it?

Google and Microsoft are using it.

You have any sources to support that claim? Where do they use it? In their infrastructure?
Post reply on HN