5 ms·
"Rust has a fantastic learning curve." Is this some kind of typo?
by hu3 8y ago
"Rust has a fantastic learning curve."
Is this some kind of typo?
- justinpombrio 8y agoIt's very smooth after you climb the initial brick wall :-). EDIT: Let me say something of substance. There's a steep learning curve for getting past Rust's borrow checker. But the language documentation and compiler error messages are the best I've seen of any language. I wouldn't say that Rust is an easy language to pick up, but it's surprisingly easy to learn for what it does.
- wwright 8y agoMuch better than C++’s “climbing the stairs to Moria”
- deleted 8y ago[deleted]
- gpm 8y agoI doubt it. Rust's learning curve is much better than C/C++ (assuming your target is "reasonably competent at writing code other people would want to use" and not "can make a linked list").
- hu3 8y agoEasier than C/C++ doesn't mean much and certainly doesn't grant a language "fantastic learning curve" status.
- saagarjha 8y agoC isn't really that complicated; it just makes it a lot easier to make mistakes.
- smt88 8y ago> easier to make mistakes That sounds like a core part of the definition of "steep learning curve"
- microcolonel 8y agoIt is also easy to make a program that compiles in C, and somewhat easy to make it work in some case from there. The real tough part is learning all the tooling required to do anything complex reliably in C.
- Althorion 8y agoI don’t know… I’d rather say that learning curve is more of a journey from ‘I can write code’ through ‘I can write code that compiles’, ‘I can write code that works’, ‘I can write code that works well’ to ‘I can write code that works well and is readable’ and certainly the first few steps are much harder in Rust than in C or even C++, so I’d call that a steeper learning curve.
- smt88 8y agoA few points on that: - Rust skips (or almost skips) some of those steps. If you can write code that compiles, you can also write code that works. It forces you to be very specific about your intentions, which isn't possible in language with less-thorough type systems and compile-time checks. - I agree that the curve is steeper at first, but it's arguably impossible to write code that "works well and is readable" in C/C++ (which is why we have Rust in the first place). That makes the latter part of the learning curve an asymptote.
- saagarjha 8y ago> Rust skips (or almost skips) some of those steps. If you can write code that compiles, you can also write code that works. It forces you to be very specific about your intentions, which isn't possible in language with less-thorough type systems and compile-time checks. Forcing new programmers to be specific about intentions they may not even know they are supposed to have doesn't necessarily work. > I agree that the curve is steeper at first, but it's arguably impossible to write code that "works well and is readable" in C/C++ (which is why we have Rust in the first place). That makes the latter part of the learning curve an asymptote. I don't agree with your analysis of "works wells and is readable". It's not too to write C code that works well and is readable. Sure, your code might occasionally break–but the point is that it works most of the time. This isn't necessarily a good mindset to have as a software engineer, but with regards to the specific claim that Rust is easier than C: it's not, because it enforces better practices, which is mental overhead and complexity that C doesn't need to deal with.
- gpm 8y agoHence why I clarified the point on the learning curve that I, and I expect the author of that line, is interested in.
- atoav 8y agoI think it is quite easy to do simple things like opening and closing files reading writing. String manipulation and working with vectors can be similar to python at times.. The ownership concept is a bit harder to grasp, it took me maybe a day to get the initial understanding and a year to really feel comfortable in all situations. The thing is, now that I understand it it is not only very powerful, but it allows you to think about your code differently: because of the strict ownership rules you tend to be aware at all times of the impact of the code you are looking at in any given moment. Combine this with the strong type system and you really feel in control. When I moved from python to Rust I probably wouldn’t recommend Rust to beginners. In hindsight I am not so sure about that anymore. It is hard, but it is teaching some concepts every programmer in any language could use and it is incredibly consistent.You rarely find any weird edge cases that are the way the are because of some arbitrary decision. Most language design decisions have been extremely careful considered and you can feel that. This is contrary to many traditional beginner languages, whkch are often filled to the brim with weird edge cases. The cargo environment is incredible.I wish I had something like this for python
- gpm 8y ago> [teaching rust to beginners] I feel similarly, I'm not sure it would be success, but I think it would have a good chance. I'm very tempted to try and design a "learn programming via rust" course and then find some guinea pigs (err ... students) to see how it works. If I had infinite free time I definitely would.
- atoav 8y agoI learned programming mostly with processing (https://processing.org/ https://processing.org/) For beginners the huge benefits would be: - instant visual feedback: Loops make much more sense when you can see them - easy to get running (I’d argue rust is the same) - Limited enough to learn basic concepts and not get overwelmed The hardes thing about teaching any traditional language is probably explaining why it is mostly a command line/terminal thing without huge efforts.
- roywiggins 8y agoIt's way easier to learn to write correct Rust code than correct C code. Correct as in not leaking memory or reading uninitialized memory or segfaulting, which probably everyone who first started writing C spent time wrestling with and learning how to use Valgrind and so on.
- saagarjha 8y agoYes, of course; I'm pretty much of the opinion that it's basically impossible to write correct C code because it's so easy to make mistakes in. However, it is easy to write code that generally works, more so than in Rust, which puts up abstractions designed to prevent every single kind of mistake, some of which you might not even know exist because you've just started learning programming. Which approach is better? Not sure. But that's a different question.
- Pristina 8y agodriving a 747 isn't that hard, just turn on the engine and pull up once you are at take off speed.
- timw4mail 8y agoRight, the hard part is landing.
- geofft 8y ago"A minute to learn... a lifetime to master."
- opan 8y agoIt might be an effort to use the more correct meaning, in that a steep learning curve means learning ramps up very fast.