Live data from Hacker News

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

news.ycombinator.com

151–160 of 291 posts

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

#151
post #6

Earlier quoted context omitted.

Also anyone big besides mozilla, who created it?

Microsoft in VS Code: https://code.visualstudio.com/updates/v1_11#_text-search-imp... /plug :-)

I don't think that counts. I'm not using c when I run grep.

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

#152
post #42

Earlier quoted context omitted.

>"I don't think there's much incentive post C++11 to really consider porting anything (even small things) over" I am curious why specifically C++ 11? Could you elaborate?

Let's look at Rust's homepage: - Zero-cost abstractions - C++, in my opinion, is the founding father of zero-cost abstractions. - Move semantics - we've had this since C++11. - 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. - Efficient C bin…

> - Move semantics - we've had this since C++11.

C++11 move semantics and Rust move semantics are not equivalent. C++ requires every movable type to have a null state, and a (perhaps derived) move constructor that can potentially throw exceptions.

Rust avoids the null state problem by statically omitting the constructor call (or, in the dynamic case, inserting a flag into the stack frame rather than forcing the programmer to reuse the object itself). It gains some ability to optimize by forbidding unwinding during a move.

> I don't think you're gonna convince C++ (and C developers, of course) programmers who've been doing systems programming for a long time to stop everything and jump to Rust.

That's not the goal. The goal is to provide a tool for new projects like Servo, or incremental partial rewrites like Firefox, or new infrastructure like ripgrep.

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

#153
post #148

Earlier quoted context omitted.

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.

Rust frontloads some required learning related to shared data because of the borrow checker and lifetimes (which is different example of the same kind of frontloaded learning that comes with static type checking.)

OTOH, I don't think this makes it harder to learn in net, because it saves down-the-road learning needed for high effectiveness of a likely greater magnitude than what is frontloaded. But it does raise the learning cost of getting to basic proficiency, in the same way as static typing (which, done well, has the same kind of down-the-road savings) does.

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

#154
post #143

Earlier quoted context omitted.

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

Rocket is one big one. Just recently though, serde and diesel started working well on stable Rust. Other than that, unless you're doing embedded stuff or SIMD, you should be fine on stable.

Unfortunately, Rocket does not appear to be on track to work on stable Rust for the foreseeable future.

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

#155

Earlier quoted context omitted.

Nitpick : > 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. Classes and interface can be implemented without indirect dispatch...

Only if you monomorphize interfaces—which gives you Rust's traits.

No. THe fundamental difference is that rust traits cannot convey structural information , classes (java and c++ can)

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

#156
post #151

Earlier quoted context omitted.

Microsoft in VS Code: https://code.visualstudio.com/updates/v1_11#_text-search-imp... /plug :-)

I don't think that counts. I'm not using c when I run grep.

They are shipping ripgrep with VS code.

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

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

No language can fix mistakes, but in Rust if you have a() calling b() which calls c(), there is no way* that c can jump to a without any indication of it in b. You at least need to have `?` somewhere in b. I consider it a really good thing, among other advantages.

* panic + catch_unwind, but that's special and not meant or used in practice for error handling

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

#158
post #151

Earlier quoted context omitted.

I don't think that counts. I'm not using c when I run grep.

They are shipping ripgrep with VS code.

But shipping a program using rust != using rust. If that was the case I've used Erlang despite never having written a single line of it because I've shipped rabbitmq.

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

#159
post #143

Earlier quoted context omitted.

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

Rocket is one big one. Just recently though, serde and diesel started working well on stable Rust. Other than that, unless you're doing embedded stuff or SIMD, you should be fine on stable. Unfortunately, Rocket does not appear to be on track to work on stable Rust for the foreseeable future.

I was hoping with serde being on stable things would settle down. What's keeping rocket on nightlies?

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

#160

Earlier quoted context omitted.

Only if you monomorphize interfaces—which gives you Rust's traits.

No. THe fundamental difference is that rust traits cannot convey structural information , classes (java and c++ can)

There's an open (and desired) RFC for this. It's not likely to happen soon since it's not a super high priority, but I'd be willing to bet it gets merged in the future.
Post reply on HN