Live data from Hacker News

Ask HN: Is it worth investing in learning Rust?

news.ycombinator.com

61–70 of 82 posts

Re: Ask HN: Is it worth investing in learning Rust?

#61
post #47

Could I have a tangential question: I did learn what is Rust for, but if there is a steep learning curve, it is that much better comparing to C++? I worked about 15 years professionally in C++, it's a solid language, and it is used by many open source projects and companies as well. You can also do "anything" in it, like in Rust, and the abstractions don't incur performance penalties.

Are you one of the three people in the world who can write C++ code without security holes? If not, I'd say it's worth it. That was half joking. :) The half serious answer I can give is: Do you have a job offer you want to take or at least a solid plan how you can use it professionally? There are so many C++ jobs, that you can most likely find another one that meets all your other requirements (location, salary, doma…

Yes the second point is exactly what I was getting at - how exactly is Rust so much better that it justifies to learn it instead of C++. (but I don't imply it isn't, just curious to see some real points).

Re: Ask HN: Is it worth investing in learning Rust?

#62

Think of Go as a better Python and Rust as a better C. Which type of programming do you do more? Rust is harder to learn but solves some harder problems and arguably you'll learn more valuable concepts as a result.

> Think of Go as a better Python and Rust as a better C.

That's an interesting position, because the Go designers specifically intended for Go to be a better C.

Re: Ask HN: Is it worth investing in learning Rust?

#63

Think of Go as a better Python and Rust as a better C. Which type of programming do you do more? Rust is harder to learn but solves some harder problems and arguably you'll learn more valuable concepts as a result.

> Think of Go as a better Python and Rust as a better C. That's an interesting position, because the Go designers specifically intended for Go to be a better C.

> That's an interesting position, because the Go designers specifically intended for Go to be a better C.

So what? Go is not a better C. The C interop overhead by itself is proof enough for that.

Re: Ask HN: Is it worth investing in learning Rust?

#64
post #37

I have written non-trivial code in Rust and Go. The thing about Rust is that it needs a bit of perseverance and experience of writing a bit of non-trivial code in Rust to really appreciate it. Writing tutorial like code won't cut it. Life-cycle of a Rust developer: https://imgur.com/kNkV7jm Good, bad and the ugly: https://imgur.com/udNcZXa With Go, in my head it is best explained in terms of the scene in the movie: P…

> Good, bad and the ugly: https://imgur.com/udNcZXa

What does "Development experience is very intense" mean?

Re: Ask HN: Is it worth investing in learning Rust?

#65

To answer your question, it would be good if you indicated what your experience is already and what you want to do! Just my opinion (given my own experience and goals; if your experience/goals are different the below may be irrelevant): As a constant waverer, my answer to the "Go or Rust" question was, after much time, "no". Instead I'm returning to C++ and trying to learn how to use modern C++ idioms and finding thi…

I write modern C++ as my day job and work on mobile apps in swift/objc/kotlin/dart, and services in python for fun on the side.

I don’t know if it’s just cuz I code modern C++ so much, but I’ve learned to love c++, even when compared to much easier and theoretically more productive languages like swift and kotlin.

Re: Ask HN: Is it worth investing in learning Rust?

#67
post #15

Earlier quoted context omitted.

Learning and using multiple languages is absolutely vital to being able to choose the right tool for the job. You have time to learn both and switching is a necessary skill if you want to program professionally

> to learn both and switching is a necessary skill if you want to program professionally There is a hoard of professional Java or C# developers that invalidate the idea that you need to know more then one language to program professionally. While this might seem odd to a hn reader, where there is weekly blog posts of comparing languages or trying out the new shiny thing at a startup. One need to remember the audience…

My advice is sound for anyone working as a programmer because it gives them more options. Many of those Java/C# devs are stigmatized in a mold and will have more trouble applying to jobs outside large enterprise.

Re: Ask HN: Is it worth investing in learning Rust?

#68
post #61

Earlier quoted context omitted.

Are you one of the three people in the world who can write C++ code without security holes? If not, I'd say it's worth it. That was half joking. :) The half serious answer I can give is: Do you have a job offer you want to take or at least a solid plan how you can use it professionally? There are so many C++ jobs, that you can most likely find another one that meets all your other requirements (location, salary, doma…

Yes the second point is exactly what I was getting at - how exactly is Rust so much better that it justifies to learn it instead of C++. (but I don't imply it isn't, just curious to see some real points).

AFAIK, the design goals of Rust are better security and correctness in general, than C++. Have you looked at Rust and decided that it does not achieve that goal?

Re: Ask HN: Is it worth investing in learning Rust?

#70
post #64
post #37

I have written non-trivial code in Rust and Go. The thing about Rust is that it needs a bit of perseverance and experience of writing a bit of non-trivial code in Rust to really appreciate it. Writing tutorial like code won't cut it. Life-cycle of a Rust developer: https://imgur.com/kNkV7jm Good, bad and the ugly: https://imgur.com/udNcZXa With Go, in my head it is best explained in terms of the scene in the movie: P…

> Good, bad and the ugly: https://imgur.com/udNcZXa What does "Development experience is very intense" mean?

An example:

So suppose you have the following pseudo code:

   x = f()

In other languages you start using 'x' straight away. You can call member functions on it, compare it, etc. In Rust if x happens to be of type Option or Result (which are wrapper types i.e. they wrap the value), then you need to understand these first very well to write idiomatic Rust code. These types have combinator functions like 'map', 'and', 'and_then', 'or', 'or_else', 'unwrap_else', etc. if unwrap() is not suitable for your use case. If you are coming from a non-functional language, one cannot help get a feeling that all you wanted was to use the value and you have to learn so much upfront. At the end of it you are mentally exhausted.

My productivity increased a lot, once I realized that there is a pattern to these and knowledge gain with Option & Result is transferrable to using Future's combinators as well. It is very hard to explain it to someone as to how to get to this state. There lies the challenge with teaching Rust and I think Steve Klabnik and team has done really good job with documentation.

Post reply on HN