I, however, discovered Rust in the meanwhile. It has generics. And it is not too complex either and has quite a few other bonuses.
I, however, discovered Rust in the meanwhile. It has generics. And it is not too complex either and has quite a few other bonuses.
The worst thing we can have on any HN thread is a debate about the virtues of Rust vs. Go. They are different languages with somewhat different long-term goals and very definitely different short-term goals, and these threads are never interesting in anything but a sort of sporting event spectator way.
I will just say that while there are a lot of things I like more about Rust than about Go, generics in Rust come at a cognitive cost. They're infectious; they don't get used the way people say they need them for Go ("I need to be able to sort arbitrary things and have sets of arbitrary types"); they're as fundamental to Rust as interfaces are to Go. It adds a lot of additional indirection.
I'd say: If you can code in C#/TS (or anything like) + go, then it only depends if you have a free weekend.
However you can litter your code with unwrap and clone to reach the finish line quickly, but then you lose the two main value props of the language and likely lose performance and runtime consistency over other languages.
Basically I get the high level abstractions and package management that I expect from Python, while inheriting a set of tools that help finally realize some of the high performance, zero-copy idealism of C++ (slices, lifetimes).
That's why is better to learn Rust coming from a C++ background.
(And in my experience this mental model can also be of value even in languages were memory management is handled by the language runtime)
I think one think that could seriously be improved is high-quality explanations of Rc, RefCell, etc, and where and why they are used.
I have found myself piecing together explanations from various books, Reddit threads, etc just to try to wrap around these.
Also, Rust struck me as quite a lot more challenging before non-lexical lifetimes and rust-analyzer, so it's possible that you're responding to outdated criticism.
Consider initialization: C++ has dozens of different ways of initializing objects that in turn interact in complicated ways with move semantics and references and so forth. Rust's initialization story by contrast is straightforward: you just make the thing you want to make using struct or enum literals and maybe wrap those initializers in functions if you want.
If you use vanilla Rust, it honestly feels quite high level, almost like Ruby or Python.
Most of the time your IDE's messages (or "cargo check" output) is sufficient to find all the things the compiler will complain about.
I usually find that once I've fixed all of those, I compile it once and it just works.