Live data from Hacker News

Rust vs C Pitfalls

garin.io

41–50 of 379 posts

Re: Rust vs C Pitfalls

#41
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…

It's very rare that any programmer switches computer languages. You're probably going to retire as a c programmer. What are they going to teach in school? What are new systems programmers going to start with? I suspect it'll be rust and go, not c.

I'm 19, I started out with Java, I switched to JavaScript for some time, I move on to Python for which most of my projects exist in and sometimes I use C when the job counts for it. I'm also a pretty big fan of PHP and a few other technologies that are very nice.

To recap this has been my life as a programmer: Java -> JavaScript -> PHP -> Python/C/Assembly

This dream that most people have made up about programmers not switching languages is a dream. I switch whenever one language can do a task better then another. I don't get caught up in "best language" fights.

Re: Rust vs C Pitfalls

#42

Earlier quoted context omitted.

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.

Rust has gc, no?

Depends on your Rust implementation. You can have an implementation without one and use it to make, say, an operating system.

Re: Rust vs C Pitfalls

#43
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…

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…

For me this is pretty easy. It's about leadership.

The leaders of Go foster an attitude of exclusiveness (just like a month ago they wanted to get rid of the Go subreddit in favor of a solely Google owned option of Google groups).

The leaders of Rust are very receptive and helpful to new people. They are on IRC / Reddit and many other channels.

I'd much rather invest my time into a truly open language and to me, that is not Go.

Re: Rust vs C Pitfalls

#44
post #26
post #19

Earlier quoted context omitted.

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

I'm terribly sorry you've never encountered an experienced developer who uses C or C++ before, or think we're non-existent, or that using extremes like "never" is a reasonable position instead of an incredibly terrible hasty generalization. If there were as many blown off feet as comments on HN suggested technology even as it currently is simply wouldn't function. Do you even understand how much mission and safety cr…

No one has ever argued that it's impossible to write c code, but just because you haven't found those kinds of bugs in your code, doesn't mean that it isn't there. We're still finding 10+ year old bugs in Linux.

Re: Rust vs C Pitfalls

#45

Earlier quoted context omitted.

Like you I need something like NumPy and SciPy for my work. I'd also like an IDE. An IDE goes a long way to helping me feel comfortable to use a language.

https://internals.rust-lang.org/t/introducing-rust-language-...

I don't care about the backend and how it's implemented. I don't write IDEs. I write software in IDEs. If the IDE is good, and by good I mean provide autocomplete and features on par with Eclipse for Java,and it needs to be fast and easy to use.

Fast and easy to use are UI tricks that can't be handled by a server.

Edit: I just realized that this may be read in a negative connotion and I didn't mean it like that. I just mean that I'm not the person who should be looking at those. I just know it doesn't exist yet and I'd like it to. Telling me of the Rust Server thing gives me no information as to how close the IDE is to being done.

Re: Rust vs C Pitfalls

#46

Earlier quoted context omitted.

It's very rare that any programmer switches computer languages. You're probably going to retire as a c programmer. What are they going to teach in school? What are new systems programmers going to start with? I suspect it'll be rust and go, not c.

I'm 19, I started out with Java, I switched to JavaScript for some time, I move on to Python for which most of my projects exist in and sometimes I use C when the job counts for it. I'm also a pretty big fan of PHP and a few other technologies that are very nice. To recap this has been my life as a programmer: Java -> JavaScript -> PHP -> Python/C/Assembly This dream that most people have made up about programmers no…

Yeah but you're just getting started. Talk to me after you've been paid to be a python developer for 20 years or whatever and tell me how interested you are in learning a new language.

I play with a lot of languages but I've invested a lot of time into learning python and getting a nice python workflow going. It would take a lot for me to switch to another primary first language.

I work at a tech company that's been around since the 90s and the guys that were writing perl and java in the 90s are still writing perl and java. You'd have to drag them kicking and screaming into using a different language.

Re: Rust vs C Pitfalls

#47

Earlier quoted context omitted.

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.

Rust has gc, no?

Not in the mandatory runtime overhead, cycle collection, or non-deterministic pausing senses of the word.

Re: Rust vs C Pitfalls

#48

Earlier quoted context omitted.

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.

Rust has gc, no?

No, it does not. It does allow you to implement it if you want though: https://github.com/Manishearth/rust-gc

Re: Rust vs C Pitfalls

#49
post #18

Earlier quoted context omitted.

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?

I don't work in that field, but I doubt game programmers will be early adopters of rust, as I think they mostly don't care about memory safety.

Re: Rust vs C Pitfalls

#50

Earlier quoted context omitted.

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.

Rust has gc, no?

Not really, no. You could implement one with e.g. reference counting, but one is not provided for you by default.
Post reply on HN