Live data from Hacker News

A 30-minute Introduction to Rust

doc.rust-lang.org

91–94 of 94 posts

Re: A 30-minute Introduction to Rust

#91

Earlier quoted context omitted.

> Right now the extra compile-safety of Rust is IMO not worth giving up the other benefits of C++ I can't speak to everyone's use case, but for ours memory safety is extremely important. C++ is not safe, and we still see tons of memory safety issues, many security-sensitive, in practice, despite using modern C++ for all new code. Even if safety isn't as important to you, there are other reasons you might be intereste…

What kind of issues do you see still with modern C++11 code?

All kinds of memory safety issues. Heap use-after-free is very common. You can go to Bugzilla and search for sec-critical to get a list of the ones Mozilla has disclosed.

Re: A 30-minute Introduction to Rust

#92
post #87

Earlier quoted context omitted.

Is this something that can be used in Rust? Or is it a feature that will be implemented later?

I am not familiar enough with the details. We don't have an _exact_ analogue, though our Traits are similar-ish. I've pinged #rust, I'll see if I can get someone who knows more to answer here.

I was mostly curious if there is some kind of (formal) specifications that one can use (axioms).

Re: A 30-minute Introduction to Rust

#93
post #75

Earlier quoted context omitted.

I apologize for not answering your question in this reply, but people still debate which language features are appropriate for which tasks... My understanding is that Erlang is still primarily used in the telco industry, as it's name implies. In general Erlang shines in doing most software that would run on a server for long periods of time when interruption is expensive (it includes the ability to hot-patch running…

I'd love to hear about how GCs can be useful for hard real-time systems! I was always under the impression that you needed to avoid that kind of stuff, so any links / information you have would be really interesting.

It comes down to the fact that in hard real-time you care about doing things in bounded amounts of time, and in soft real-time you typically want to do things "as fast as possible" and fixed-cost incremental GCs tend to be comparably high fraction of CPU usage versus a good generational stop-the-world collector.

Many hard real-time systems already operate with an excess of CPU power in order to simplify analysis of scheduling. Furthermore you are already bounding things like allocations, and a simple incremental GC that runs on a timer tick can guarantee to run in fixed time if you have bounded allocations per timer-tick.

All of this is somewhat moot though as many hard real-time systems completely eschew dynamic allocations.

Re: A 30-minute Introduction to Rust

#94
post #50

Earlier quoted context omitted.

> the libraries for the GUI layer are still very immature. This is absolutely true, but that's a different concern than "It would seem that neither Rust nor Go serve this area and probably do not intend to do it either," which is what I'm curious about. One of the open questions with GUI toolkit stuff is that Rust does not have named parameters, but Qt, for example, uses them heavily.

I've only based my impression on a cursory look on the Rust API docs, so I might be wrong, but I did not find any references to database libraries, UI toolkits, multimedia and so on. I did not know about Servo, so I will have to look into it. Will the cross-platform components from Servo be included in the Rust standard library? To give you some background about the kind of apps I was referring to - I am right now wo…

> I am right now working on a UI-driven app that will be deployed to Android and on the desktop. I am using C++, Qt and platform code where necessary.

This doesn't seem very performance-critical. I doubt the best tool for the job is C++/Rust/C.

Post reply on HN