Has anyone actually tried to teach/learn Rust as a first programming language? People did it with C++ (and even C) at some point, is Rust that much more problematic? (And the attempt might even inform new convenience features: the proc macro system gives Rust a lot of inherent flexibility there.)
So I think it would be interesting to teach users Rust's point of view first, before they learn the "misconceptions" from other languages.
But in practice something like JS is better, because students can make something engaging appear on screen before they lose patience.
If you really need a general 'long enough' strategy and can't just pick a sensible place to drop the object statically, that's what Rc<> and Arc<> provide - built from the ground up via refcounting.
> Users coming from C are surprised that references aren't like pointers.
For good reason. General "pointers" don't have a simple, compositional semantics that preserves modularity (Yes, I know about separation logic; that's not practically reasonable in a language like Rust - or C/C++ for that matter - that's not built around expressing complex logical invariants in code); references do. A piece of code that uses pointers in non-reference-like ways must be understood as a unit. Which is why Rust strives to reduce such code to a minimum, marked with a scary "unsafe" keyword.
Why not take it for granted like you do for C vs ASM?
I'd say Rust is quite a bit easier to learn than C++, while being a step up from Java and two steps up from Python or JavaScript.