Live data from Hacker News

Why I love Rust

speakerdeck.com

41–50 of 159 posts

Re: Why I love Rust

#41

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…

The problem is that C++ is a language where the "top 150,000 most essential things to get you started with C++" is a volume that spans several book shelves. Even Bjarne Stroustrup allegedly rated his own C++ skills at maybe 7 out of 10. If you start with C++, you're committed to a multi year project, that's what it takes to advance from novice to junior level.

The whole C++ language is indeed a monstrosity designed by a committee that resulted from years of piling up "requested features", but with "modern" C++14 they try to narrow-down the idiomatic constructs to a smaller, more manageable set.

Re: Why I love Rust

#42

Earlier quoted context omitted.

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

Not really. From a carreer perspective you are 100% certain that there will be a lot of demand for C++ in 5 years (since the whole IT infrastructure is written either in C or in C++), whereas for Rust you are taking a huge bet.

Exactly, C++ has been around for a very long time, so much runs on it, depends on it, and it is not going anywhere any time in our lifetimes, I'm certain of that. That makes it a very valuable skill. You can always study the newer languages when interested in them (I find them all fascinating), but for a deep leg into the way the industry works at its core, I think knowing C++ gets you very far. Google touts Go a lot, but so much of Google's tools are actually C++ at heart (protobufs and Chrome for example), and Apple touts Swift and has its own frameworks in Objective-C and now Swift, but under the hood, so much of their toolkits and the language of Swift itself are implemented in C++; nearly all cross-platform games we know and love for a wide variety of devices and OS are C++ -- my point is that it is a crucial language and it does not hurt to understand it.

Re: Why I love Rust

#43
post #36

Earlier quoted context omitted.

From a career perspective, Go is currently the language you'd want to learn. Here's my list of some of the largest companies from a few months ago, excluding a bunch of Chinese ones I haven't heard of (of which there are many, considering that China is most likely Go's largest adopter ( http://herman.asia/why-is-go-popular-in-china) ). Walmart, Apple, Facebook, eBay, Intel, Google, Mozilla, IBM, Microsoft, DigitalOce…

HN didn't like your link touching the parens: http://herman.asia/why-is-go-popular-in-china

Ah, cheers for the correction, it's unfortunate I can't edit it =(

Re: Why I love Rust

#44

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.

If you don't have many languages under your belt (and wanting to spend 3-4 months and asking for advice what to choose suggests that), you don't really want to go with a language that popped semi-stable only several months ago, hence will be most probably a subject to deep changes (either in the language itself or in standard library). Rust is not (yet) the way to go.

Re: Why I love Rust

#45

Earlier quoted context omitted.

The problem is that C++ is a language where the "top 150,000 most essential things to get you started with C++" is a volume that spans several book shelves. Even Bjarne Stroustrup allegedly rated his own C++ skills at maybe 7 out of 10. If you start with C++, you're committed to a multi year project, that's what it takes to advance from novice to junior level.

Sorry but this is just wrong. You do not need several years to get productive in C++. Very few professional C++ developers are using every feature of the language. You could spend a year mastering template metaprogramming alone, but do you need it? Not most of the time. Interfacing with good C++ libs (another reason to learn C++) does not require metaprogramming, and many other features fall into a the same category.…

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.

Re: Why I love Rust

#46

Earlier quoted context omitted.

Sorry but this is just wrong. You do not need several years to get productive in C++. Very few professional C++ developers are using every feature of the language. You could spend a year mastering template metaprogramming alone, but do you need it? Not most of the time. Interfacing with good C++ libs (another reason to learn C++) does not require metaprogramming, and many other features fall into a the same category.…

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?

Re: Why I love Rust

#47

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.

Speaking as someone who has used both languages, I think you should learn both if you can. Rust will give you experience with low level systems programming (memory management, parallelism, etc.) Go will give you experience with network-facing backend code. Both languages will teach you concurrency. Go is significantly more popular than Rust. But if what you want to learn is a popular language, you shouldn't be lookin…

Perhaps a nice project to learn both is to write a (simple) Go compiler in Rust :)

In the same spirit as https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_...

Go is not a very complicated language. The main difficulty of writing a Go compiler would be to write the garbage collector, but you can easily skip that part by not collecting any garbage :)

Re: Why I love Rust

#48

Earlier quoted context omitted.

Sorry but this is just wrong. You do not need several years to get productive in C++. Very few professional C++ developers are using every feature of the language. You could spend a year mastering template metaprogramming alone, but do you need it? Not most of the time. Interfacing with good C++ libs (another reason to learn C++) does not require metaprogramming, and many other features fall into a the same category.…

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, and interop with great C++ libraries and get real stuff done, in fairly short time. It took me about a month to go from Objective-C to C++ and start publishing iOS apps written almost entirely in C++. And if you don't need that, you can start writing command-line utilities in a few days at most.

Re: Why I love Rust

#49

Earlier quoted context omitted.

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

Not really. From a carreer perspective you are 100% certain that there will be a lot of demand for C++ in 5 years (since the whole IT infrastructure is written either in C or in C++), whereas for Rust you are taking a huge bet.

Maybe my perspective is biased because I work in a very conservative industry, but a large part of C++ jobs in the next 5 years will likely be about maintenance/evolution of massive legacy C++98/C++03 applications. And you won't likely use a lot of C++14 or C++17, while on the other hand the rare Rust project might be a bit more exciting. But if you're primary motivation to learn a new language is to get a job, Cpp is surely a safer bet.

Re: Why I love Rust

#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 see that possibility.

That said, if you haven't already, I think you should learn Haskell instead. Learning Haskell, for me, was the biggest departure from my previous programming experience. It forced me to re-examine more of the things that I thought I knew about organizing my thoughts into a program. And while I don't feel that I ever really got good at Haskell, I feel that my time learning Go and Rust has been so much more valuable for having learned Haskell first.

It's very unlikely that you'll find a job programming Haskell...there are a few, but not many. But I feel confident in saying that learning Haskell will make you a better programmer in whatever language you do end up getting paid to write.

That said, if the choice is really between the two, I'd probably say learn Go. 3-4 months into programming Go and you'll probably be quite adept with it. 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. I'm a couple months into Rust and I feel like I'm a least 6 months away from being productive with it.

Post reply on HN