Rust w/o experience in low-level or functional languages


#1

How do Rustaceans feel about this language as an introduction to low-level or functional languages? With the limited documentation we presently have (most of which is written for developers with extensive experience in other similar languages) would Rust be a suitable starting point for someone coming from the Client-side, having only been exposed to JavaScript, PHP, Ruby, etc?

Older languages, such as Java or C++, may have issues that we are seeking to avoid with a language like Rust, but would it be easier for someone new to systems level programming to start with one of those and then come to Rust after they have a clearer picture of what is happening?

Is Rust currently accessible to noobs without a Computer Science degree?


#2

I feel like right now the documentation is a bit minimal, just because the language and libraries have evolved so rapidly in the past year, but it’s finally settling down to the point where the documentation has a chance to catch up.

Once that happens, I would say that Rust is a much better language to learn than C++; you still have to think about all of the same issues in C++ (object lifetimes, types, templates, iterators, etc), and while modern C++ has a lot of newer tools to help you deal with that, because it has evolved that way over time there are still a lot of sharp corners left over, and there are still things which will never be able to be made safe without breaking the language, so there are a lot more pitfalls and weird warts in the language.

Java comes from the other direction; it started out safe and garbage collected, it doesn’t make you manage object lifetimes manually, but it also didn’t have more powerful tools like generics for a long time, and while it does now have generics, they are nowhere near as powerful as those in C++ or Rust.

So, Rust right now is a pretty clean slate. A lot of the cruft from early iterations has been removed or feature gated, leaving a fairly clean core without much legacy baggage like Java or C++ have. It is a lot safer than C++, with a much smaller set of features to have to learn about (and in the case of many of the features in C++, avoid or tread carefully about). And it has a more modern design, and allows a lot more control of object allocation and lifetime, than Java.

Thus, I would recommend learning Rust over C++ or Java, if you’re just interested in a good language to learn and not the size of the market, though with the caveat that right now the documentation is catching up, and the library ecosystem will be shaking out all of the issues caused by more aggressive feature gating for the 1.0 release.

I do not think that you need any particularly strong knowledge of low-level programming, functional programming, or computer science to learn Rust.

My advice is just to jump in. Write “Hello, World”, write fizzbuzz, and move on from there. Feel free to ask plenty of questions, here or on StackOverflow!


#3

I think it is more a mental than a knowledge problem.
People using C++ already know that the program should have single ownership and strict borrowing rules wherever possible but they have learned it the hard way and needed a few years for it. The borrow checker is more help than a burden.
In languages with a garbage collector you can just start writing code and if the programs is small it still works, so rust’s borrow checker and maybe even the static type system may seem horribly restrictive and it may take a long frustrating time until the first program compiles.

Functional programming is definitely not required but recommended because it improves your coding style.