Live data from Hacker News

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

news.ycombinator.com

141–150 of 291 posts

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

#141

Earlier quoted context omitted.

You can use signal handlers if you need to, but it's not like there's a good way to handle most bus errors in userspace to begin with. Anyway neither standard C nor standard C++ even spec out interrupt handling, and SIGBUS isn't a standard signal :P

A signal handler ( signal!(sig::ffi::Sig::BUS, test_bus); ) will catch the bus error in userspace. You now need to communicate that caught exception to the offending fn. For that, you'll need setjmp() and longjmp() , something else that Rust lacks. If Rust is going to bill itself as a systems programming language , it needs these. I added them for my app: extern { #[link_name = "llvm.setjmp"] pub fn setjmp(a: *mut i8…

Whenever I see "systems programming language" in the context of Rust advocacy I've basically begun mentally substituting "programming at the applications/systems grey-area border". There's a lot of ambiguity about what "systems programming" really means, so I wouldn't say they're not using it correctly, but I've been getting the impression that your brand of systems programming isn't what they're targeting.

And that's okay. There is a ton of space outside of that context, and still within the "systems" space that C and C++ could use a high quality competitor in, and Rust fits that bill nicely, in my view.

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

#142

The Rust ecosystem has lost sight of the forest for the trees in my opinion. I highly agree with Graydon's opinion in "Rust is mostly safety" [1] that it's raison d'être is memory safety and concurrency in the systems space. But strangely a significant amount of time is being put in to making it usable for other tasks. I think this has to do with the different cultures between C/C++ developers versus other developers…

[deleted]

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

#143

Earlier quoted context omitted.

Web developers have zero issues with using Rust for web development though. The Rocket web framework is rather intuitive. I even built my website entirely in Rust with it. http://mmstick.tk

"zero issues" is a bridge too far. Rocket, for example, only works on nightly Rust, and that might be a non-starter for a lot of people.

This has been my biggest issue trying to learn rust, there are too many projects that only support the bleeding edge.

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

#144
post #134

Earlier quoted context omitted.

Being this emotionally invested in a feature, really is unprofessional...

Many people sooner or later have to spend an evening/night debugging serious issue affecting critical production system, discovering that system is left in inconsistent state after some corner case is throwing an exception that the code between it and the catch block didn't anticipate/handle correctly. And then they become emotionally invested.

> code between it and the catch block didn't anticipate/handle correctly

This sounds like a general errors handling issue that nor exceptions nor monadic errors types can prevent.

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

#145
post #47

Not too sure what is meant by "mainstream" but I can see Rust getting a foothold in certain industry, such as medical, automotive or aerospace. To get there, it will need to be mature and be stable significant enough. It will also need a big player to take that first step and prove it in production. Imagine if Ford mandates its suppliers to use Rust for the software in its car and it faced little problems after a few…

I'm big into Rust, but I doubt that anyone in security-critical industries is going to put themselves on the line by using a language that's neither standardized nor government-approved. Nobody ever got fired for buying IBM, and nobody ever got fired for picking MISRA C.

The industry I see Rust making headway into first is actual security. E.g., encrypted communications, etc.

The problem with aerospace, automotive, etc. is that there's substantial physical risk associated with errors. So there's not a lot of incentive to go with something brand new. Things like network security, etc. are a place where people are maybe a bit more concerned about safety than in some other areas, but also need performance, and notions of risk are more vague.

The interest of Tor developers in Rust is not surprising to me at all, for example.

Nothing is going to happen overnight, and I don't see C/C++ going anywhere, but I wouldn't be surprised at all to see Rust gaining a foothold in certain places, and expanding from there. I could also see it being a flash in the pan too, but it's unpredictable really.

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

#146

Earlier quoted context omitted.

> reflecting our current understanding and knowledge on how to build safe system...

Despite all the flashy tools that proponents of C and C++ claim that makes C++ as safe as Rust, it's not doing any good at stopping the exponentially-increasing amount of vulnerabilities and crashes that are being reported over the last few years.

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.

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

#147
post #55

Earlier quoted context omitted.

> - Threads without data races - C++11 introduced a threading library as part of the language. We can avoid a lot of data races, deadlocks, etc. if you actually look deeper into how to implement the modern threading library well. So - we can implement threads without data races if we implement threads without data races? The reason people cite memory safety as a feature of Rust over C++ is because you get it for free…

> The reason people cite memory safety as a feature of Rust over C++ is because you get it for free Nothing is free, language design is an exercise in compromise. OP might need to calm down a bit with the aggressive language, but underneath all that there is real message from people using (trying to ?) use modern C++ : The added safety you mentioned can 1) be really well approximated using modern C++ technics, 2) add…

[deleted]

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

#148
post #12

I would say unlikely, for the simple reason that Rust is just really hard .

It's not really hard. It's incredibly easy, from my perspective. It only took me about a week to get a hang of it -- about the same amount of time that it took me to get the hang of Go. Yet the difficulty curve progressively becomes easier and easier until it's much easier to write and maintain software in Rust than Go or even Python. Now I can regularly slap out solutions to challenging problems that would be much h…

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.

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

#149

Earlier quoted context omitted.

Being this emotionally invested in a feature, really is unprofessional...

Using exceptions would be unprofessional. If someone were to use exceptions, then all of my carefully crafted error-handling routines would go up in flames because someone's library decided not to use an algebraic data type for conveying error messages across boundaries. It's bad enough that C libraries can suffer catastrophic failures bringing the entire stack down. I want a consistent error-handling strategy, and p…

> Using exceptions would be unprofessional. Unless it happens to be the best tools for the particular scenario...

> then all of my carefully crafted error-handling routines would go up in flames

No just sandbox the code inside a try catch...

> pattern matching is the best method of clearly displaying intents and possible downfalls.

You are stating an opinions as a fact here.

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

#150
post #20

Earlier quoted context omitted.

You have a point. I've done medium-sized C projects in my degree, but my professional background is mostly web. I've been using Rust heavily for 10 months. I think that if you want to use it for web stuff you very much can, but the language is more immature than it might first appear. If the community keeps going the way it is, I hope to work with it commercially by 2020. The most promising things I've read about it…

Why use Rust for web development? There are very few web back ends in the world that need the speed of C++ or Rust. Java, C#, Go, Haskell, OCaml are much easier to ramp people up with and hire for.

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?

Post reply on HN