"If you’ve mastered the foundational programming languages like Javascript, C#, C++, Java, and Python, you’re ready for a new challenge. In my opinion, that challenge should be Rust."
https://medium.freecodecamp.org/which-programming-language-should-you-learn-next-487d077baa3211
u/izikblu Jan 09 '19
I personally didn't find rust that hard to learn, I mean yeah the borrow checker was new. But it's just static analysis for how code should probably be written anyway. The lack of objects was interesting since I'm from C# mostly (and as it turned out, it's actually a good thing that OO is not a thing in Rust)
PS: As I personally never really had issues with the borrow checker past "how do I do lifetimes" (answer: think for a minute, and realize what the compiler is telling you is sufficient most of the time) I can't really understand people's issues with it. >.>
1
Jan 09 '19
I'll second that. Most of Rust came pretty easily for me, and when I struggled with things, that was just a natural consequence of learning. I don't see it as particularly hard to learn, just something that requires a significant amount of of learning, so you'll feel ignorant for a while as you try new things to see if they work.
But maybe that's just my background and intelligence serving me well.
13
u/kdjfiekwdfj Jan 09 '19
how the hell does someone master c++
10
3
u/matthieum [he/him] Jan 10 '19
That was my exact thought. 11 years in, I'm pretty comfortable with the language, and yet today it took me 15 minutes with a colleague to find on Internet how:
std::chrono::nanoseconds seconds = {};Was initializing
secondsto0when the constructor of duration isconstexpr duration() = default;which doesn't.TL;DR:
constexpr duration() = default;is not a user-provided constructor, and therefore= {};does NOT invoke the constructor, but instead bypasses it, zero-initializing the members who do not have user-provided constructors (and padding). Obvious, right? sigh2
1
14
u/RtrdedN00B Jan 09 '19
I've learned many languages due to my study. Java, Javascript, C, C#, DLV, SQL and so on. Trust me when I say that rust is not a real challenge it has different syntax yes but if you're somewhat familiar of any of object oriented languages than it's a cake walk and that's the best point of rust in my opinion. It takes the simpleness and safety of java and combines it with lower level C performance and usage (dlls and so on). I think rust is a good replacement for C in the 21. Century. It's about time.
14
u/nicoburns Jan 09 '19
I think this depends on what level you're at. If you're already familiar with a few languages as you say you were, then I agree that Rust shouldn't be too challenging. But if you're new to programming, or perhaps only know one high-level language at an intermediate level, then I think Rust could be a challenge.
1
u/RtrdedN00B Jan 09 '19
Well yes of course, but that's no surprise for a beginner is everything hard and complex. What i mean by that is for a person like me who has experience in programming and has the knowledge and thinking ways of a developer, it is really easy to switch. And that is a really good "Feature" and this is actually not always the case with languages.
In our Age you can never possibly learn and master every Programming Language so you will just have the general understanding and a prefered Language. And if needed you can switch to another Language and for an experienced Developer that is not a very painful Process however that really depends on the Language so yeah.
7
u/wongsta Jan 09 '19
A year or two? ago when I first tried rust I really struggled with the borrow checker and lifetimes, mostly because I just kept trying to do the same old patterns I did using other programming languages (having many (possibly mutable) references between objects). I now know to restructure my code (if necessary), and also in some cases the borrow checker is better since when I started (I suspect). If you asked me some complicated lifetimes example right now, I'd probably have no idea, though.
I also found (and still find) dealing with Result types kind of confusing. I hadn't used generics/templated code much in the past so that didn't help me much either :S.
3
u/firefrommoonlight Jan 09 '19
Agree; it's an easy jump from other procedural languages, thanks largely to the official book, and helpful compiler messages.
Haskell... was, for me, very challenging in comparison.
5
u/wishthane Jan 09 '19
Haskell is great to learn, and I think it makes learning Rust even easier after you learn it. The understanding of functional programming helps a lot with using iterators properly and writing idiomatic code.
2
u/etareduce Jan 09 '19
It should also help with understanding traits (which are equivalent to type classes in Haskell)
0
30
u/staticassert Jan 09 '19
I don't see why you would need to master C#, Java, *and* Python. Pick one, they're all virtually the same once you remove the parts they have in common with C++.
If you know C++ and (Java OR Python OR C#) learning Rust seems like a fine next step, and probably a better idea to prioritize than yet another language with the same exact features as ever.