3 ms·
I'm not coming from C++, but my experience with Rust has been: * Read the book, got some of the concepts but most of it went over my head. * Did nothing, ma
by tps5 10y ago
I'm not coming from C++, but my experience with Rust has been:
* Read the book, got some of the concepts but most of it went over my head.
* Did nothing, maybe thought about it a little bit.
* Two weeks later: read the book again. It made more sense but some of it is still lost on me.
* Actually wrote some Rust. Was hard, frequently consulted the book, the "by example" book, r/Rust, and google.
* Two weeks later, it's much easier. I'm still consulting outside resources frequently, but I generally know how to fix problems as they arise and my mental model of the how the language executes is becoming more and more accurate.
I've spent on average 30 minutes a day working on a pretty simple Rust program for about a month now. The advantages of Rust so far have been: if it compiles, it works. Extremely easy to refactor: for my main data structure, I've switched between vecs and arrays back and forth probably 4 times to get a feel for the differences. This is generally really easy to do because they both implement the the iterator trait. In the other languages I use (at work), switching between one type of collection and another would be a huge time sink and involve a lot of annoying (though trivial) refactoring.
The main advantage of Rust for me (and the reason why I decided to check it out vs go) is that I don't have a lot of experience thinking about memory at a low level. The dynamic languages I work with abstract that away from the programmer. I wanted something that would force me to think about how and where memory is being allocated, and whether I want to pass by reference or value. For someone who has spent a lot of time with C/C++ or just someone with a background in CS/programming languages, this may all seem obvious to you. But there's a lot of programmers out there who learned with dynamic languages and don't have a good mental model for memory. Rust is a good instructional tool for us.
I don't really have an opinion on whether Rust is "production ready." It's being developed rapidly though, so I think it'll get there.