3 ms·
True. But. The learning curve of Rust should not be underestimated, IMHO. I do not know except by my own experience and "gossip", and would be interested in
by worik 5y ago
True. But.
The learning curve of Rust should not be underestimated, IMHO. I do not know except by my own experience and "gossip", and would be interested in hearing from a bigger shop that has to deal with it.
Rust can make an experienced developer feel utterly clueless. The borrow checker is a very harsh mistress. Moving from C++ to Rust for a computer programmer with many years of experience in C++ must be a frustrating and humbling experience. The simplest things become so hard.
I love Rust, but I do not use it professionally (I would love to). I can clearly see that it is a step closer to what we have been waiting for, it may even be the destination. But I can imagine the pain of moving a programmer from 20 years of C++ into Rust. Becoming a novice again
- zozbot234 5y ago> The learning curve of Rust should not be underestimated, IMHO. Not sure how this is relevant in a conversation about C++, for which the notion of a learning curve is even hard to apply given that practically no one manages to write code that can be trusted to be free of basic defects in the language. > Rust can make an experienced developer feel utterly clueless. The borrow checker is a very harsh mistress. And rightly so. Rust is only unique in that you get the hangover before deploying the code in production. It's puzzling that some might see this as a drawback of the language.
- worik 5y agoI am commenting on the difficulties faced moving a computer programmer from C++ to Rust. Any conversation about C++ has to consider the costs of abandoning the ship
- pjmlp 5y agoSky vs Snowboard, basically. Sky day one is very easy, yet it takes years to master. Snowboard day one is going to be mostly about falling, unless you want into xgames, it is much easier to master afterwards. It depends on which experience one wants to have.
- jltsiren 5y agoWhen I started learning Rust after ~25 years of C++, I was quite productive after a couple of months. If C++ teaches you something, it's that you can be productive with a language without being fully familiar with it. After all, 25 years doesn't seem to be enough for learning C++. The borrow checker is not such a big deal. You should have learned the basics in undergraduate CS in the context of concurrency and/or databases. If you have done shared data parallelism in modern C++ (let's say with OpenMP), you are probably used to similar reasoning. Borrow checking and lifetimes do make some design patterns difficult to use, which is a reason you should not use such patterns in Rust. But there are almost always ways of achieving the same goals with idiomatic Rust. It's a bit like having to unlearn gotos when transitioning from BASIC to more serious languages and their fancy "structured programming".
- arinlen 5y ago> When I started learning Rust after ~25 years of C++, I was quite productive after a couple of months. Stating that it takes 25 years of experience in order to become productive with Rust doesn't really sound like a positive note. Keep in mind that your typical user of high-level programming languages already has a very hard time grasping the basic mechanics of C++, and Rust's memory management paradigm alone is renowned for having quite a steep learning curve when compared to C++.
- nicoburns 5y agoFWIW I was productive in Rust after a couple of months with a background ~5-10 years of experience in primarily JavaScript and PHP (no prior low level experience). Rust does have a steep learning curve, but I'd argue that it's shallower than that of C++ (which puts shoots up in complexity as soon as you wish to include a dependency). This is especially true if you are actually intending to write production code. There's no way I'd have comfortable releasing my C++ code to production after only 2 months, but my Rust code was completely solid despite my lack of experience in the language.
- erik_seaberg 5y agoLearning curve is a temporary problem because Rust is pretty new and a lot of people need to begin ramping up at the same time. Hopefully we’ll get to amortize that across many years of projects, like C++.
- imron 5y ago> Moving from C++ to Rust for a computer programmer with many years of experience in C++ must be a frustrating and humbling experience My experience was the exact opposite. To write correct and safe C++ code you need to be tracking things like lifetimes and ownerships anyway (even in modern C++). Rust allows you offload all of that cognitive overhead to the compiler, which greatly simplifies things. There was a short period of time needed to get used to the borrow checker, but coming from C++ I understood why it was complaining about these things so the errors didn't come across as opaque or confusing.
- pjmlp 5y agoUnless one tries to write GUI software, then it is Rc<RefCell<>> everywhere.
- qalmakka 5y agoHonestly, if moving from C++ to Rust is frustrating for a developer not because of missing but because of borrowing, lifetimes and move semantics, it probably means that they were writing very "old style" C++. I write my modern C++ following Rust semantics as much as I can, and I think it's the right way to currently use C++ without incurring in slews of preventable issues. Rust IS modern C++ in a stricter package IMHO. C++ still has some extra magic (constexpr, SFINAE) that in Rust is yet not doable or requires procedural macros, but the core language is definitely designed around concepts such as by-value and move semantics which are crucial concepts to use when writing modern C++ applications.
- zozbot234 5y agoRust const is the equivalent to constexpr in C++. As for other compile-time "magic", Rust macros are a much more principled approach to that feature set.
- qalmakka 5y agoRust const is still way, WAY more limited than constexpr in C++. You can't do basically anything in const Rust yet, while C++'s constexpr even supports memory allocations.