>>18575
I happen to be a person who came to Rust from a C (and no C++) background.
>lack background knowledge on RAII and smart pointers, on generics, on move semantics, and so much more.
so two things to point here:
maybe with the exception of smart pointers, those are things you do in C, but you do them manually, and without type safety.
you manually release resources (free, close, ...etc) instead RAII, and you manually cast
///void*\\\ pointers instead of using proper generics, ..etc.
with move semantics, it depends on your data-sharing architecture, but it is a pattern that also exists where you pinky-promise yourself not to use data after sending it (implicitly or explicitly) to another thread for example.
so with that view, and unlike c++, rust for c developers often doesn't require much of a paradigm shift. just a different discipline when writing code. for example, the way rust encourages static dispatch with generics is much closer to c than using OOP+vtables in C++.
and with that in mind, let's go to the second point.
while some of the features you mentioned share the same name with features
available in c++, the design, implementation, and integration of the feature can be significantly different. we actually had this problem in rust support forums for years. people coming from c++ had to basically unlearn everything from their c++ past to do rust properly. we didn't have this problem with C people, of which i myself originally was one.
the only initially challenging thing to people coming from c, or any other language, is (rust's) move semantics and the borrow checker. and even that is overstated. not to mention that it quickly becomes the favorite thing about the language for people coming from a c background.
oh, that probably saved me a week of debugging quickly becomes a common utterance.