Live data from Hacker News

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

news.ycombinator.com

131–140 of 291 posts

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

#131

Earlier quoted context omitted.

Haskell has exceptions. So does Rust. People just prefer to use Either / Result (with good reason).

Exception in Haskell ?

Yeah. Try grabbing the head of an empty list, for instance. People for the most part don't like exceptions in Haskell, but that's not the same as the language not having them.

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

#132

Earlier quoted context omitted.

> I think a much more interesting question is how much safer a code written in rust today would be vs a C/C++ code written today , reflecting our current understanding and knowledge on how to build safe system. A lot safer, judging by browser exploits.

> 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.

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

#133

Earlier quoted context omitted.

I would be downright appalled if Rust were to start promoting exceptions. It's an anti-feature.

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 pattern matching is the best method of clearly displaying intents and possible downfalls.

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

#134

Earlier quoted context omitted.

I would be downright appalled if Rust were to start promoting exceptions. It's an anti-feature.

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.

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

#135

Earlier quoted context omitted.

I would be downright appalled if Rust were to start promoting exceptions. It's an anti-feature.

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

I'd even prefer the golang way of error handling by `if err!= nil` over exceptions, treating errors as values is so much better

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

#136

I want to believe. I love Rust. I feel like Rust is the language I've waited for all my life. Yesterday there was a story about Rust here on HN: "Programming ARM Cortex-M Microcontrollers with Rust." Among the replies was a complaint; someone couldn't figure out how to write a static buffer and was discouraged. Someone else provided an example of how to do this. Finally, another person noted how unfortunate the solut…

I think you noted one of the problems Rust is going to have with adoption: its raison d'être is solving technical debt (specifically, security debt).

Unfortunately, the reason that's a problem is because most management doesn't even know what it means. And that's not likely to change.

So saying "We have a language that might take a bit longer but solves X" is a difficult conversation when the reply is "Wait, what is X?"

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

#137
post #27

I had great hopes for Rust as the future of systems programming, but they've decreased over time. Parts of the language are just too cute. The borrow checker was brilliant. Any future language that doesn't use garbage collection will have to have one. That was the big advance in Rust. But the object system (yeah, they're called structures and traits) is too weird. The enum approach to variant records is too weird. Th…

Odd that you find closures weird. I use them everywhere that I can because it allows you to make your library more modular and, at the same time, allows you to write unit tests for otherwise impossible functions to test without dependency injections and other convoluted external setups that won't pinpoint the cause of an error very well.

Case in point, in the Ion shell that I am working on, I have a shell expansion module within that takes a structure containing closures that are used to grab and expand array variables, string variables, tilde variables, and process expansions.

Because of this, the module can live as an entirely separate piece of software with no dependency on the specifics of Ion, and I can write reduced unit tests that extensively test every component. I could strip it out of Ion and use it with a completely different shell project. That shell would just have to provide the batteries (closures) that define what to do with certain tokens.

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

#138
post #41
post #27

I had great hopes for Rust as the future of systems programming, but they've decreased over time. Parts of the language are just too cute. The borrow checker was brilliant. Any future language that doesn't use garbage collection will have to have one. That was the big advance in Rust. But the object system (yeah, they're called structures and traits) is too weird. The enum approach to variant records is too weird. Th…

This is like reading criticism of Erlang which we use. A bunch of people (the vast majority of which never shipped anything in it) have plenty of arguments against it, those of us that actually use it love it to bits. Rust is productive, efficient and a joy to use. For things we required C/C++ before, we will be using Rust now.

Rust aims to be mainstream hence the effort to improve ergonomics and marketing,documentation. Or atleast safe systems programming to be mainstream.

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

#139
post #103

Earlier quoted context omitted.

Because "addressing" the concerns would make Rust a worse language. 1. Removing structs and interfaces (in favor of what? Java-style classes and interfaces?) would make Rust more verbose, less of a systems language, and slower at runtime due to the indirect dispatch. 2. Changing the keyword "enum" to something else is a cosmetic change which would make as many users unhappy as it made happy. (We know, because we soli…

I didn't suggest changing the Rust language. There are other ways to address concerns than by saying "you're wrong," which is effectively what your comment did.

Nothing wrong with pointing out that someone's logic is wrong. It is true that the only way to address these 'concerns' is to change Rust into something that it is not. Rust without closures, structures, traits, pattern matching, and algebraic data types would not be Rust, it would be C. We don't want C.

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

#140

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…

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.
Post reply on HN