Live data from Hacker News

Rust vs C Pitfalls

garin.io

11–20 of 379 posts

Re: Rust vs C Pitfalls

#11

Earlier quoted context omitted.

On similar note, why Rust over Go? If I look at everything I used to write in C, I'd say 80% is well suited for Go and the rest I would fallthrough to Rust for. For the stuff where having a GC and slightly less control is OK, I don't see why I would want to use Rust. Rust is just much more complex and I prefer to keep it simple stupid (KISS). Basically, Go is good for 90% of what I used to use Java for and 80% of wha…

I don't use Rust just because I want to avoid GC. I also use it for algebraic data types, compile time elimination of data races, sophisticated polymorphism, a clear and simple module system, excellent tooling in the form of Cargo and an unrelenting focus on providing abstractions with as little overhead as possible. (I've used Go and Rust daily for the past few years. I love them both.)

> I don't use Rust just because I want to avoid GC.

Go that is?

Re: Rust vs C Pitfalls

#12
post #10
post #2

If you're fighting, you've lost. The way to convert everyone to Rust you need to be better the the competition. Not just better as in "look at my features that will make your code safer". People may see the value but think "I get on just fine without the borrow checker so it isn't too important". You need to be far better then the replacement by providing the following: * Great Tooling ( IDEs ) * Great Libraries ( Ev…

Rust has by far the best tooling and documentation support out of all languages I've seen. Library support is great too, at least in that Cargo is an amazing platform and it's too easy to import C libraries. What do you feel is actually missing from Rust? Nothing has stopped me from replacing C entirely on the low end, and even the high end for application software development.

> What do you feel is actually missing from Rust?

A solid NumPy-like library, for one.

Re: Rust vs C Pitfalls

#13
The kind of safety guarantees Rust provides are, in my opinion, insufficient justification for experienced developers to move from C or C++. Rust has other features that make it generally superior in certain (many) contexts. The safety is a nice "add-on" effect, I suppose, but my view is that constantly hyping safety as the biggest selling point is missing a mark.

Re: Rust vs C Pitfalls

#14
post #2

If you're fighting, you've lost. The way to convert everyone to Rust you need to be better the the competition. Not just better as in "look at my features that will make your code safer". People may see the value but think "I get on just fine without the borrow checker so it isn't too important". You need to be far better then the replacement by providing the following: * Great Tooling ( IDEs ) * Great Libraries ( Ev…

In addition to htaunay's post about docs, Rust also has cargo and crates.io which are fucking awesome. Blog posts are one way to showcase tooling, perhaps not this one, but they have their place.

> Rust also has cargo and crates.io

Which is undersold in the propaganda! Safety, ehhh I'll take it but I'm not jonesing for it. A package manager that works and has adoption? Thank you! I've wasted far too much time wrangling C++ dependencies by hand...

Re: Rust vs C Pitfalls

#16

Earlier quoted context omitted.

I don't use Rust just because I want to avoid GC. I also use it for algebraic data types, compile time elimination of data races, sophisticated polymorphism, a clear and simple module system, excellent tooling in the form of Cargo and an unrelenting focus on providing abstractions with as little overhead as possible. (I've used Go and Rust daily for the past few years. I love them both.)

> I don't use Rust just because I want to avoid GC. Go that is?

Hmm, not sure I understand? Re-reading, perhaps my phrasing wasn't clear. What I meant was that I use Rust, and it's not simply because it lacks GC. There are lots of other good reasons too.

To be even clearer: I don't think Rust's value proposition depends on whether you absolutely must avoid GC or not.

Re: Rust vs C Pitfalls

#17

Earlier quoted context omitted.

I don't use Rust just because I want to avoid GC. I also use it for algebraic data types, compile time elimination of data races, sophisticated polymorphism, a clear and simple module system, excellent tooling in the form of Cargo and an unrelenting focus on providing abstractions with as little overhead as possible. (I've used Go and Rust daily for the past few years. I love them both.)

> I don't use Rust just because I want to avoid GC. Go that is?

No. He is saying he uses rust to avoid GC, but not just to avoid GC.

Re: Rust vs C Pitfalls

#18

Earlier quoted context omitted.

C is a very small and very portable language. Rust is not. I wondering why people bother comparing them at all.

I doubt that a significant amount of C programmers will switch to Rust. On the other hand, rust is very attractive for us C++ programmers.

Do you think we'll see major games having significant engine components being written in Rust?

Re: Rust vs C Pitfalls

#19
post #13

The kind of safety guarantees Rust provides are, in my opinion, insufficient justification for experienced developers to move from C or C++. Rust has other features that make it generally superior in certain (many) contexts. The safety is a nice "add-on" effect, I suppose, but my view is that constantly hyping safety as the biggest selling point is missing a mark.

If only these mythical experienced developers that never shoot themselves in the foot actually existed.

Re: Rust vs C Pitfalls

#20

Earlier quoted context omitted.

C is a very small and very portable language. Rust is not. I wondering why people bother comparing them at all.

I doubt that a significant amount of C programmers will switch to Rust. On the other hand, rust is very attractive for us C++ programmers.

I appreciate rust making a break from C++ and cleaning up some of the warts, immutability by default, having real modules etc. But I am not really impressed with its memory management thing. It's a bit tiresome to check stuff with valgrind, sure, but I don't have to worry about making cyclic data structures satisfy the borrow checker. I don't see the trade off as worth it.
Post reply on HN