Live data from Hacker News

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

news.ycombinator.com

171–180 of 291 posts

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

#171

Earlier quoted context omitted.

> I can't think of any way that Rust differs in this regard from, say, Ruby. Or JavaScript. "Everything is an expression" is pretty different. You can say ML/Lisp, but those are non-top-10 languages/styles.

> > I can't think of any way that Rust differs in this regard from, say, Ruby. Or JavaScript. > "Everything is an expression" is pretty different. No, in Ruby, everything is also an expression; this is sometimes unrecognized because some constructs that are cognates to constructs that are statements in other languages are frequently (but inaccurately) referred to as statements in Ruby (the most frequent example I've…

Eh you got me. I still think it's pretty surprising (especially for systems languages), but OK :)

Also Ruby is a kitchen sink language, so I don't know if we should be using it as the baseline for a language with a small surface area.

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

#172
post #112

Earlier quoted context omitted.

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.

:-) I've been trying to keep the nuance in my comments here. When I said, "I think that if you want to use it for web stuff you very much can," I'd emphasise the, "if you want to." At the moment a lot of hobbyists are doing web stuff in Rust. Commercially I think usage would be in the same vein as the common pattern of rewriting Ruby services in Go if it starts to limit performance.

Rust is also pretty attractive for use in AWS Lambda and Google Cloud Functions. It's ability to strictly control memory usage and make the most of CPU resources is really powerful in an environment where you're billed based on memory and CPU time.

If you've got a particularly hot lambda function, rewriting it in Rust is a pretty simple way to save a bunch of money.

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

#173
post #146

Earlier quoted context omitted.

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.

[deleted]

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

#174
post #134

Earlier quoted context omitted.

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.

Rust requires at compile-time that you handle each case.

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

#175
post #141

Earlier quoted context omitted.

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'…

Rust is targeting all meanings of the word "systems programming". If you need some feature that Rust doesn't have, file an issue or write an RFC.

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

#176

Earlier quoted context omitted.

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.

You are basically stating that we should be doing both try/catch AND result/option at the same time, everywhere. That would get annoying fast.

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

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

Japan's NicoVideo seems to agree. 550K lines of Erlang, and 20K lines of Rust.

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

#178

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

Maybe it's nostalgia for pre-Web 2.0 designs but I love your website; it has character and feels personal compared to most pages I peruse.

Thanks. I've never built a website before, but now I've built a website, and a web server + cms client at the same time. I've been thinking of open sourcing the code at some point in the future.

The website stores all the content in a database, uses handlebar templates to generate HTML pages, stores the generated HTML pages in a concurrent hash map compressed with the native Rust implementation of Zopfli, and only regenerates pages after a set amount of time -- all in pure Rust. I can serve an unrealistic amount of requests per second -- just bottlenecked by a consumer-grade network connection.

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

#179
post #58

Earlier quoted context omitted.

> I think at some point, Rust will have enough tooling that people will try to start using it for graphics and videogames The game developer community is actually one of the communities that jumped onto Rust really early, well before it hit 1.0.

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.

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

#180
post #81
post #58

Earlier quoted context omitted.

> I think at some point, Rust will have enough tooling that people will try to start using it for graphics and videogames The game developer community is actually one of the communities that jumped onto Rust really early, well before it hit 1.0.

You mean hobbyist ? All the AAA games are still written in C++, none of the big studios is even considering to switch. Rust type system/restrictions would get into the way more than it would help in AAA game dev. Memory safety is not a problem in game development, they will just patch the bugs. Studios have whole ecosystems written in C++ that works for them. Benefits are really low compared to costs, that's why it's…

Type restrictions aren't really a problem, but in fact really helps out game development in the long run.

> Memory safety is not a problem in game development, they will just patch the bugs.

You must not have played any Bethesda titles. That said, there is much more to Rust than memory safety. That's just a side effect of the safe parallelism -- it's a minor story.

Post reply on HN