Live data from Hacker News

Why I love Rust

speakerdeck.com

61–70 of 159 posts

Re: Why I love Rust

#61

Earlier quoted context omitted.

> it remains the language where so many jobs are "The" language where so many jobs are? It's one of many. > As for whether C++ has any techniques to teach that Rust does not, C++ is definitely a unique experience to go through and certainly gives a developer more insight into the actual machine they are working on in a way that few languages do. Can you name, specifically, a way in which C++ gives you "more insight i…

I think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. At the very least, it will help you appreciate other languages, but it can also show you areas where you get manual control over performance in ways no other language offers. And, perhaps most significantly, there are a wealth of C++ libraries out there that have no equivalent in other languages, and be…

If my understanding is correct, you can use any of those C++ libraries from Rust as well.

Re: Why I love Rust

#62

Earlier quoted context omitted.

Junior level is when you know all language features, and are starting to learn the ecosystem of tools and libraries. You're probably much smarter or more dedicated than me if you feel this level can be reached in a much shorter time.

I think you are missing the point. It is widely understood in the C++ world that no one needs to know "all language features" and in reality, almost no one does. It's not a language where that is necessary or expected because the language is large and has a tremendous range of uses, and no one needs all of it for a particular project or focus. But you can most certainly learn all the basics of writing good C++ code,…

this is really true in my experience. I worked on a large server for a few years and most of my work was spent doing pretty mundane things (mostly interfacing with other libraries(apis)). I certainly didn't use every feature and, like you note, most programmers don't. Sometimes I would come across a new C++ capability that was utilized and I would just learn and utilize it, but this depended on the feature and situation. In fact, the only thing that's really different about it (at least to me), was the constant concern over memory usage (and all of the make/build stuff). These are just parts of the language that you need to consider that are avoided in other languages (the dirty secret here is that regardless of the language, you still need to consider them). I liked C/C++ because you can pretty much do anything with it, but you can get to certain points faster with a different language (again, depending on the target usage). Language platforms capture programmer inertia, which is why big companies try to own them. However, in reality, since there are so many, most good programmers seem to be able to switch between them fairly easily (which is a good thing).

Re: Why I love Rust

#63
post #61

Earlier quoted context omitted.

I think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. At the very least, it will help you appreciate other languages, but it can also show you areas where you get manual control over performance in ways no other language offers. And, perhaps most significantly, there are a wealth of C++ libraries out there that have no equivalent in other languages, and be…

If my understanding is correct, you can use any of those C++ libraries from Rust as well.

If those C++ libraries expose a C API, then yes.

Re: Why I love Rust

#64

I want to spend at least 3-4 months learning a new language but just can't figure out if I should spent time learning Rust or Go. I am thinking more of it from a career perspective than interest.

From a career perspective, I think it depends what you want to focus on in your career.

Go is actually very diverse in its applications, but certainly has the edge on rust for building web type applications.

I learnt Go in 2014 (largely by doing HackerRank puzzles) and its good to have it in your repertoire,

But right now I'm interested to learn Rust, because its a total different approach to anything I've ever done before.

Re: Why I love Rust

#65

I want to spend at least 3-4 months learning a new language but just can't figure out if I should spent time learning Rust or Go. I am thinking more of it from a career perspective than interest.

From a career perspective, I think it depends what you want to focus on in your career.

Go is actually very diverse in its applications, but certainly has the edge on rust for building web type applications.

I learnt in 2014, and its good to have it in your repertoire, But right now I'm interested to learn Rust, because its a total different approach to anything I've ever done before.

Re: Why I love Rust

#66
post #50

I want to spend at least 3-4 months learning a new language but just can't figure out if I should spent time learning Rust or Go. I am thinking more of it from a career perspective than interest.

Disclaimer: I say this having spent much of last year learning Go and the last couple months learning Rust. I'm a big fan of both languages. I see Go as my go to language for more situations right now, but I think that once Rust has matured a bit more, I'll choose it for more and it will probably become more useful to me than Go. I doubt I'll ever get to the point where I'd choose it for everything over Go, but I can…

> 3-4 months into programming Rust and you may just be getting past the phase where it takes you 10 minutes of fighting the borrow checker to get relatively simple code to compile.

This exactly is why I can never get past the first couple weeks of playing with Rust. Every few months I revisit it and every couple weeks after that I put it aside again.

When I was first learning C++ I spent a huge amount of my time inside the debugger trying to figure out why a pointer wasn't ... pointing. There was always a reasonable explanation that way my fault and if I had just understood what my code was really doing I would have coded things right and it wouldn't have crashed.

Now we have Rust that essentially takes away that entire problem. Just wipes it out by way of a clever compiler. Only now we substitute this same learning curve "debugging" the compiler rather than debugging memory space. (Probably a better trade-off in the long run. Rust sort of bets on that being true anyway.)

Go does not suffer from either of these traits. For me, Go is not often a "fun language" to code in but it's eminently practical and is remarkably fast to pick up for what it does express. I've ported a couple pieces of C# application systems to Go and they've worked really well. But it's kind of a grind unwinding the higher level abstractions from C# into the more primitive Go space.

I wish there was some way to bury Rust's borrow checker for those parts of an application where you don't want to care about it and then surface it gradually when you do want it. Because the elegance of the rest of the language is what pulls me back every few months.

Re: Why I love Rust

#67

Earlier quoted context omitted.

I actually think you'd go far to spend 3 - 4 months learning C++. Almost every language you can likely encounter in your career will use some feature that will get introduced to you in C++, especially modern C++, and, almost any language will be easier to learn and use after first going through a C++ learning curve. Besides, C++ is still the big player, more than all others. Even Apple's new language Swift is written…

This is a weird answer to the question, especially since Rust very probably has whatever "modern C++ techniques" you were thinking of.

Rust lacks higher kind types which C++ has had in the form of template templates since 1998. Rust also lacks the equivalent of variadic templates. If you want to see where that is different take a look at generic tuple manipulation in C++11 vs Rust.

Re: Why I love Rust

#70
post #46

Earlier quoted context omitted.

Junior level is when you know all language features, and are starting to learn the ecosystem of tools and libraries. You're probably much smarter or more dedicated than me if you feel this level can be reached in a much shorter time.

Junior level is when you know all language features Wow, in that case I don't think I've ever worked with anybody who's ever managed to reach "junior level" in any language. What do you call someone with, for example, just a PhD in the relevant field, 6 or 7 years of professional programming experience and several successfully shipped products under his belt. And what do you call the guy that is obviously his junior?

When someone with a PhD in the relevant field, 6 or 7 years of professional programming experience and several successfully shipped products under his belt starts learning something new, he's a junior at that new thing.
Post reply on HN